public BucketServerSideEncryption withType(Type type) {
        this.type = type.toString();
        return this;
    }
<p>
The server-side encryption algorithm that's used by default to encrypt objects that are added to the bucket.
Possible values are:
</p>
<ul>
<li>
<p>
AES256 - New objects use SSE-S3 encryption. They're encrypted with an Amazon S3 managed key.
</p>
</li>
<li>
<p>
aws:kms - New objects use SSE-KMS encryption. They're encrypted with an KMS key (kmsMasterKeyId), either an
Amazon Web Services managed key or a customer managed key.
</p>
</li>
<li>
<p>
aws:kms:dsse - New objects use DSSE-KMS encryption. They're encrypted with an KMS key (kmsMasterKeyId), either an
Amazon Web Services managed key or a customer managed key.
</p>
</li>
<li>
<p>
NONE - The bucket's default encryption settings don't specify server-side encryption behavior for new objects.
</p>
</li>
</ul>

@param type
       The server-side encryption algorithm that's used by default to encrypt objects that are added to the
       bucket. Possible values are:</p>
       <ul>
       <li>
       <p>
       AES256 - New objects use SSE-S3 encryption. They're encrypted with an Amazon S3 managed key.
       </p>
       </li>
       <li>
       <p>
       aws:kms - New objects use SSE-KMS encryption. They're encrypted with an KMS key (kmsMasterKeyId), either
       an Amazon Web Services managed key or a customer managed key.
       </p>
       </li>
       <li>
       <p>
       aws:kms:dsse - New objects use DSSE-KMS encryption. They're encrypted with an KMS key (kmsMasterKeyId),
       either an Amazon Web Services managed key or a customer managed key.
       </p>
       </li>
       <li>
       <p>
       NONE - The bucket's default encryption settings don't specify server-side encryption behavior for new
       objects.
       </p>
       </li>
@return Returns a reference to this object so that method calls can be chained together.
@see Type
aws-java-sdk-macie2/src/main/java/com/amazonaws/services/macie2/model/BucketServerSideEncryption.java