code: public AutomationExecution withTargetLocations(TargetLocation... targetLocations) {
          if (this.targetLocations == null) {
              setTargetLocations(new com.amazonaws.internal.SdkInternalList<TargetLocation>(targetLocations.length));
          }
          for (TargetLocation ele : targetLocations) {
              this.targetLocations.add(ele);
          }
          return this;
      }
docs: <p>
  The combination of AWS Regions and/or AWS accounts where you want to run the Automation.
  </p>
  <p>
  <b>NOTE:</b> This method appends the values to the existing list (if any). Use
  {@link #setTargetLocations(java.util.Collection)} or {@link #withTargetLocations(java.util.Collection)} if you
  want to override the existing values.
  </p>
  
  @param targetLocations
  The combination of AWS Regions and/or AWS accounts where you want to run the Automation.
  @return Returns a reference to this object so that method calls can be chained together.