public BucketMetadata withSharedAccess(SharedAccess sharedAccess) {
        this.sharedAccess = sharedAccess.toString();
        return this;
    }
<p>
Specifies whether the bucket is shared with another Amazon Web Services account, an Amazon CloudFront origin
access identity (OAI), or a CloudFront origin access control (OAC). Possible values are:
</p>
<ul>
<li>
<p>
EXTERNAL - The bucket is shared with one or more of the following or any combination of the following: a
CloudFront OAI, a CloudFront OAC, or an Amazon Web Services account that isn't part of your Amazon Macie
organization.
</p>
</li>
<li>
<p>
INTERNAL - The bucket is shared with one or more Amazon Web Services accounts that are part of your Amazon Macie
organization. It isn't shared with a CloudFront OAI or OAC.
</p>
</li>
<li>
<p>
NOT_SHARED - The bucket isn't shared with another Amazon Web Services account, a CloudFront OAI, or a CloudFront
OAC.
</p>
</li>
<li>
<p>
UNKNOWN - Amazon Macie wasn't able to evaluate the shared access settings for the bucket.
</p>
</li>
</ul>
<p>
An <i>Amazon Macie organization</i> is a set of Macie accounts that are centrally managed as a group of related
accounts through Organizations or by Macie invitation.
</p>

@param sharedAccess
       Specifies whether the bucket is shared with another Amazon Web Services account, an Amazon CloudFront
       origin access identity (OAI), or a CloudFront origin access control (OAC). Possible values are:</p>
       <ul>
       <li>
       <p>
       EXTERNAL - The bucket is shared with one or more of the following or any combination of the following: a
       CloudFront OAI, a CloudFront OAC, or an Amazon Web Services account that isn't part of your Amazon Macie
       organization.
       </p>
       </li>
       <li>
       <p>
       INTERNAL - The bucket is shared with one or more Amazon Web Services accounts that are part of your Amazon
       Macie organization. It isn't shared with a CloudFront OAI or OAC.
       </p>
       </li>
       <li>
       <p>
       NOT_SHARED - The bucket isn't shared with another Amazon Web Services account, a CloudFront OAI, or a
       CloudFront OAC.
       </p>
       </li>
       <li>
       <p>
       UNKNOWN - Amazon Macie wasn't able to evaluate the shared access settings for the bucket.
       </p>
       </li>
       </ul>
       <p>
       An <i>Amazon Macie organization</i> is a set of Macie accounts that are centrally managed as a group of
       related accounts through Organizations or by Macie invitation.
@return Returns a reference to this object so that method calls can be chained together.
@see SharedAccess
aws-java-sdk-macie2/src/main/java/com/amazonaws/services/macie2/model/BucketMetadata.java