Compare commits

...

1 Commits

Author SHA1 Message Date
Taylor McKinnon d4509d4209 stash 2021-05-06 16:51:45 -07:00
1 changed files with 78 additions and 1 deletions

View File

@ -64,6 +64,7 @@ class BucketInfo {
replicationConfiguration, lifecycleConfiguration, replicationConfiguration, lifecycleConfiguration,
bucketPolicy, objectLockEnabled, objectLockConfiguration, bucketPolicy, objectLockEnabled, objectLockConfiguration,
notificationConfiguration) { notificationConfiguration) {
assert.strictEqual(typeof name, 'string'); assert.strictEqual(typeof name, 'string');
assert.strictEqual(typeof owner, 'string'); assert.strictEqual(typeof owner, 'string');
assert.strictEqual(typeof ownerDisplayName, 'string'); assert.strictEqual(typeof ownerDisplayName, 'string');
@ -145,24 +146,100 @@ class BucketInfo {
}; };
// IF UPDATING PROPERTIES, INCREMENT MODELVERSION NUMBER ABOVE // IF UPDATING PROPERTIES, INCREMENT MODELVERSION NUMBER ABOVE
/**
* @since v2
*/
this._acl = aclInstance; this._acl = aclInstance;
this._name = name; this._name = name;
this._owner = owner; this._owner = owner;
this._ownerDisplayName = ownerDisplayName; this._ownerDisplayName = ownerDisplayName;
this._creationDate = creationDate; this._creationDate = creationDate;
/**
* Determines which splitter to use ( < 2 means old splitter)
* @since v2
*/
this._mdBucketModelVersion = mdBucketModelVersion || 0; this._mdBucketModelVersion = mdBucketModelVersion || 0;
this._transient = transient || false; this._transient = transient || false;
this._deleted = deleted || false; this._deleted = deleted || false;
/**
* Stores the server bucket encryption info
* @since v3
* @typedef {Object} ServerSideEncryption
* @property {string} algorithm
* @property {string} masterKeyId
* @property {boolean} mandatory
* @since v9
* @property {string} configuredMasterKeyId
*/
this._serverSideEncryption = serverSideEncryption || null; this._serverSideEncryption = serverSideEncryption || null;
/**
* Stores versioning configuration
* @type {object}
*/
this._versioningConfiguration = versioningConfiguration || null; this._versioningConfiguration = versioningConfiguration || null;
/**
* Stores the location constraint of the bucket
* @since v4
* @type {string}
*/
this._locationConstraint = locationConstraint || null; this._locationConstraint = locationConstraint || null;
/**
* Stores the bucket website configuration info
* @since v5
* @type {WebsiteConfiguration}
*/
this._websiteConfiguration = websiteConfiguration || null; this._websiteConfiguration = websiteConfiguration || null;
this._replicationConfiguration = replicationConfiguration || null;
/**
* Stores CORS rules to apply to cross-domain requests
* @since v6
* @type {object}
*/
this._cors = cors || null; this._cors = cors || null;
/**
* Stores replication configuration
* @type {ReplicationConfiguration}
*/
this._replicationConfiguration = replicationConfiguration || null;
/**
* Stores the bucket lifecycle configuration info
* @since v6
* @type {LifecycleConfiguration}
*/
this._lifecycleConfiguration = lifecycleConfiguration || null; this._lifecycleConfiguration = lifecycleConfiguration || null;
/**
* Stores configured bucket policies
* @type {BucketPolicy}
*/
this._bucketPolicy = bucketPolicy || null; this._bucketPolicy = bucketPolicy || null;
/**
* Determines whether object lock capabilities are enabled on a bucket
* @since v7
* @type {boolean}
*/
this._objectLockEnabled = objectLockEnabled || false; this._objectLockEnabled = objectLockEnabled || false;
/**
* Stores the object lock configuration of the bucket
* @since v7
* @type {ObjectLockConfiguration}
*/
this._objectLockConfiguration = objectLockConfiguration || null; this._objectLockConfiguration = objectLockConfiguration || null;
/**
* Used to store the bucket notification configuration info
* @since v8
* @type {NotificationConfiguration}
*/
this._notificationConfiguration = notificationConfiguration || null; this._notificationConfiguration = notificationConfiguration || null;
return this; return this;
} }