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;
    }
<p>
The names of the on-premises instances about which to get information. The maximum number of instance names you
can specify is 25.
</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. The maximum number of instance
       names you can specify is 25.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-codedeploy/src/main/java/com/amazonaws/services/codedeploy/model/BatchGetOnPremisesInstancesRequest.java