public CreateDatastoreRequest withRetentionPeriod(RetentionPeriod retentionPeriod) {
        setRetentionPeriod(retentionPeriod);
        return this;
    }
<p>
How long, in days, message data is kept for the data store. When <code>customerManagedS3</code> storage is
selected, this parameter is ignored.
</p>

@param retentionPeriod
       How long, in days, message data is kept for the data store. When <code>customerManagedS3</code> storage is
       selected, this parameter is ignored.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-iotanalytics/src/main/java/com/amazonaws/services/iotanalytics/model/CreateDatastoreRequest.java