/** * <p> * Any product codes associated with the AMI. * </p> * * @param productCodes * Any product codes associated with the AMI. * @return Returns a reference to this object so that method calls can be chained together. */ public Image withProductCodes(java.util.Collection<ProductCode> productCodes) { setProductCodes(productCodes); return this; }
/** * <p> * Any product codes associated with the AMI. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setProductCodes(java.util.Collection)} or {@link #withProductCodes(java.util.Collection)} if you want to * override the existing values. * </p> * * @param productCodes * Any product codes associated with the AMI. * @return Returns a reference to this object so that method calls can be chained together. */ public Image withProductCodes(ProductCode... productCodes) { if (this.productCodes == null) { setProductCodes(new com.amazonaws.internal.SdkInternalList<ProductCode>(productCodes.length)); } for (ProductCode ele : productCodes) { this.productCodes.add(ele); } return this; }
/** * Any product codes associated with the AMI. * <p> * Returns a reference to this object so that method calls can be chained together. * * @param productCodes Any product codes associated with the AMI. * * @return A reference to this updated object so that method calls can be chained * together. */ public Image withProductCodes(ProductCode... productCodes) { if (getProductCodes() == null) setProductCodes(new java.util.ArrayList<ProductCode>(productCodes.length)); for (ProductCode value : productCodes) { getProductCodes().add(value); } return this; }
/** * <p> * Any product codes associated with the AMI. * </p> * * @param productCodes * Any product codes associated with the AMI. * @return Returns a reference to this object so that method calls can be chained together. */ public Image withProductCodes(java.util.Collection<ProductCode> productCodes) { setProductCodes(productCodes); return this; }
/** * <p> * Any product codes associated with the AMI. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setProductCodes(java.util.Collection)} or {@link #withProductCodes(java.util.Collection)} if you want to * override the existing values. * </p> * * @param productCodes * Any product codes associated with the AMI. * @return Returns a reference to this object so that method calls can be chained together. */ public Image withProductCodes(ProductCode... productCodes) { if (this.productCodes == null) { setProductCodes(new com.amazonaws.internal.SdkInternalList<ProductCode>(productCodes.length)); } for (ProductCode ele : productCodes) { this.productCodes.add(ele); } return this; }