public void setRestrictions(PackageOriginRestrictions restrictions) {
        this.restrictions = restrictions;
    }
<p>
A <a href="https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_PackageOriginRestrictions.html">
PackageOriginRestrictions</a> object that contains information about the <code>upstream</code> and
<code>publish</code> package origin restrictions. The <code>upstream</code> restriction determines if new package
versions can be ingested or retained from external connections or upstream repositories. The <code>publish</code>
restriction determines if new package versions can be published directly to the repository.
</p>
<p>
You must include both the desired <code>upstream</code> and <code>publish</code> restrictions.
</p>

@param restrictions
       A <a
       href="https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_PackageOriginRestrictions.html"
       >PackageOriginRestrictions</a> object that contains information about the <code>upstream</code> and
       <code>publish</code> package origin restrictions. The <code>upstream</code> restriction determines if new
       package versions can be ingested or retained from external connections or upstream repositories. The
       <code>publish</code> restriction determines if new package versions can be published directly to the
       repository.</p>
       <p>
       You must include both the desired <code>upstream</code> and <code>publish</code> restrictions.
aws-java-sdk-codeartifact/src/main/java/com/amazonaws/services/codeartifact/model/PutPackageOriginConfigurationRequest.java