public UpdateRepositoryRequest withUpstreams(UpstreamRepository... upstreams) {
        if (this.upstreams == null) {
            setUpstreams(new java.util.ArrayList<UpstreamRepository>(upstreams.length));
        }
        for (UpstreamRepository ele : upstreams) {
            this.upstreams.add(ele);
        }
        return this;
    }
<p>
A list of upstream repositories to associate with the repository. The order of the upstream repositories in the
list determines their priority order when CodeArtifact looks for a requested package version. For more
information, see <a href="https://docs.aws.amazon.com/codeartifact/latest/ug/repos-upstream.html">Working with
upstream repositories</a>.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setUpstreams(java.util.Collection)} or {@link #withUpstreams(java.util.Collection)} if you want to
override the existing values.
</p>

@param upstreams
       A list of upstream repositories to associate with the repository. The order of the upstream repositories
       in the list determines their priority order when CodeArtifact looks for a requested package version. For
       more information, see <a
       href="https://docs.aws.amazon.com/codeartifact/latest/ug/repos-upstream.html">Working with upstream
       repositories</a>.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-codeartifact/src/main/java/com/amazonaws/services/codeartifact/model/UpdateRepositoryRequest.java