public PackageGroupReference withPattern(String pattern) {
        setPattern(pattern);
        return this;
    }
<p>
The pattern of the package group. The pattern determines which packages are associated with the package group,
and is also the identifier of the package group.
</p>

@param pattern
       The pattern of the package group. The pattern determines which packages are associated with the package
       group, and is also the identifier of the package group.
@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/PackageGroupReference.java