code: public TargetGroupPairInfo withTargetGroups(TargetGroupInfo... targetGroups) {
          if (this.targetGroups == null) {
              setTargetGroups(new com.amazonaws.internal.SdkInternalList<TargetGroupInfo>(targetGroups.length));
          }
          for (TargetGroupInfo ele : targetGroups) {
              this.targetGroups.add(ele);
          }
          return this;
      }
docs: <p>
  One pair of target groups. One is associated with the original task set. The second is associated with the task
  set that serves traffic after the deployment is complete.
  </p>
  <p>
  <b>NOTE:</b> This method appends the values to the existing list (if any). Use
  {@link #setTargetGroups(java.util.Collection)} or {@link #withTargetGroups(java.util.Collection)} if you want to
  override the existing values.
  </p>
  
  @param targetGroups
  One pair of target groups. One is associated with the original task set. The second is associated with the
  task set that serves traffic after the deployment is complete.
  @return Returns a reference to this object so that method calls can be chained together.