diff --git a/src/Storage/BucketSoftDeletePolicy.php b/src/Storage/BucketSoftDeletePolicy.php index 69a0a3b4b5e..242ad8f2ad5 100644 --- a/src/Storage/BucketSoftDeletePolicy.php +++ b/src/Storage/BucketSoftDeletePolicy.php @@ -27,6 +27,8 @@ class BucketSoftDeletePolicy extends \Google\Model * @var string */ public $effectiveTime; + protected $hardDeletePauseType = BucketSoftDeletePolicyHardDeletePause::class; + protected $hardDeletePauseDataType = ''; /** * The duration in seconds that soft-deleted objects in the bucket will be * retained and cannot be permanently deleted. @@ -53,6 +55,24 @@ public function getEffectiveTime() { return $this->effectiveTime; } + /** + * The bucket's hard delete pause configuration. If set, soft-deleted objects + * in the bucket will not be permanently deleted until the hard delete pause + * is disabled. + * + * @param BucketSoftDeletePolicyHardDeletePause $hardDeletePause + */ + public function setHardDeletePause(BucketSoftDeletePolicyHardDeletePause $hardDeletePause) + { + $this->hardDeletePause = $hardDeletePause; + } + /** + * @return BucketSoftDeletePolicyHardDeletePause + */ + public function getHardDeletePause() + { + return $this->hardDeletePause; + } /** * The duration in seconds that soft-deleted objects in the bucket will be * retained and cannot be permanently deleted. diff --git a/src/Storage/BucketSoftDeletePolicyHardDeletePause.php b/src/Storage/BucketSoftDeletePolicyHardDeletePause.php new file mode 100644 index 00000000000..1d05f9bb774 --- /dev/null +++ b/src/Storage/BucketSoftDeletePolicyHardDeletePause.php @@ -0,0 +1,72 @@ +effectiveTime = $effectiveTime; + } + /** + * @return string + */ + public function getEffectiveTime() + { + return $this->effectiveTime; + } + /** + * Whether hard deletions are paused. + * + * @param bool $enabled + */ + public function setEnabled($enabled) + { + $this->enabled = $enabled; + } + /** + * @return bool + */ + public function getEnabled() + { + return $this->enabled; + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BucketSoftDeletePolicyHardDeletePause::class, 'Google_Service_Storage_BucketSoftDeletePolicyHardDeletePause');