code: public BatchGetOnPremisesInstancesRequest withInstanceNames(String... instanceNames) {
          if (this.instanceNames == null) {
              setInstanceNames(new com.amazonaws.internal.SdkInternalList<String>(instanceNames.length));
          }
          for (String ele : instanceNames) {
              this.instanceNames.add(ele);
          }
          return this;
      }
docs: <p>
  The names of the on-premises instances about which to get information.
  </p>
  <p>
  <b>NOTE:</b> This method appends the values to the existing list (if any). Use
  {@link #setInstanceNames(java.util.Collection)} or {@link #withInstanceNames(java.util.Collection)} if you want
  to override the existing values.
  </p>
  
  @param instanceNames
  The names of the on-premises instances about which to get information.
  @return Returns a reference to this object so that method calls can be chained together.