/**
  * The capabilities found within the template. Currently, CAPABILITY_IAM is the only capability
  * detected. If your template contains IAM resources, you must specify the CAPABILITY_IAM value
  * for this parameter when you use the <a>CreateStack</a> or <a>UpdateStack</a> actions with your
  * template; otherwise, those actions return an InsufficientCapabilities error.
  *
  * <p>Returns a reference to this object so that method calls can be chained together.
  *
  * @param capabilities The capabilities found within the template. Currently, CAPABILITY_IAM is
  *     the only capability detected. If your template contains IAM resources, you must specify the
  *     CAPABILITY_IAM value for this parameter when you use the <a>CreateStack</a> or
  *     <a>UpdateStack</a> actions with your template; otherwise, those actions return an
  *     InsufficientCapabilities error.
  * @return A reference to this updated object so that method calls can be chained together.
  */
 public ValidateTemplateResult withCapabilities(Capability... capabilities) {
   java.util.ArrayList<String> capabilitiesCopy =
       new java.util.ArrayList<String>(capabilities.length);
   for (Capability member : capabilities) {
     capabilitiesCopy.add(member.toString());
   }
   if (getCapabilities() == null) {
     setCapabilities(capabilitiesCopy);
   } else {
     getCapabilities().addAll(capabilitiesCopy);
   }
   return this;
 }
 /**
  * The capabilities found within the template. Currently, AWS CloudFormation supports only the
  * CAPABILITY_IAM capability. If your template contains IAM resources, you must specify the
  * CAPABILITY_IAM value for this parameter when you use the <a>CreateStack</a> or
  * <a>UpdateStack</a> actions with your template; otherwise, those actions return an
  * InsufficientCapabilities error.
  *
  * @param capabilities The capabilities found within the template. Currently, AWS CloudFormation
  *     supports only the CAPABILITY_IAM capability. If your template contains IAM resources, you
  *     must specify the CAPABILITY_IAM value for this parameter when you use the
  *     <a>CreateStack</a> or <a>UpdateStack</a> actions with your template; otherwise, those
  *     actions return an InsufficientCapabilities error.
  * @return Returns a reference to this object so that method calls can be chained together.
  * @see Capability
  */
 public ValidateTemplateResult withCapabilities(Capability... capabilities) {
   com.amazonaws.internal.SdkInternalList<String> capabilitiesCopy =
       new com.amazonaws.internal.SdkInternalList<String>(capabilities.length);
   for (Capability value : capabilities) {
     capabilitiesCopy.add(value.toString());
   }
   if (getCapabilities() == null) {
     setCapabilities(capabilitiesCopy);
   } else {
     getCapabilities().addAll(capabilitiesCopy);
   }
   return this;
 }