// DeleteBucket deletes an entire bucket from the storage engine.
977740
func (e *Engine) DeleteBucket(orgID, bucketID platform.ID) error {
	return e.DeleteBucketRange(orgID, bucketID, math.MinInt64, math.MaxInt64)
}
266117
func (s *PutBucketPolicyInput) SetBucket(v string) *PutBucketPolicyInput {
	s.Bucket = &v
	return s
}
877337
func (s *DeleteBucketInventoryConfigurationInput) SetBucket(v string) *DeleteBucketInventoryConfigurationInput {
	s.Bucket = &v
	return s
}
840666
func (s *PutObjectRetentionInput) SetBucket(v string) *PutObjectRetentionInput {
	s.Bucket = &v
	return s
}
303789
func (s *GetObjectInput) SetBucket(v string) *GetObjectInput {
	s.Bucket = &v
	return s
}
198025
func (s *BucketService) DeleteBucket(ctx context.Context, bucketID platform.ID) error {
	bucket, err := s.FindBucketByID(ctx, bucketID)
	if err != nil {
		return err
	}

	// The data is dropped first from the storage engine. If this fails for any
	// reason, then the bucket will still be available in the future to retrieve
	// the orgID, which is needed for the engine.
	if err := s.engine.DeleteBucket(bucket.OrganizationID, bucketID); err != nil {
		return err
	}
	return s.inner.DeleteBucket(ctx, bucketID)
}
152603
func (b *Bucket) DelBucket() (err error) {
	req := &request{
		method: "DELETE",
		bucket: b.Name,
		path:   "/",
	}
	for attempt := b.S3.AttemptStrategy.Start(); attempt.Next(); {
		err = b.S3.query(context.Background(), req, nil)
		if !shouldRetry(err) {
			break
		}
	}
	return err
}
703883
func (s *GetBucketLifecycleConfigurationInput) SetBucket(v string) *GetBucketLifecycleConfigurationInput {
	s.Bucket = &v
	return s
}
349469
func deleteBuckets(ns walletdb.ReadWriteBucket) error {
	if err := ns.DeleteNestedBucket(bucketBlocks); err != nil {
		str := "failed to delete blocks bucket"
		return storeError(ErrDatabase, str, err)
	}
	if err := ns.DeleteNestedBucket(bucketTxRecords); err != nil {
		str := "failed to delete tx records bucket"
		return storeError(ErrDatabase, str, err)
	}
	if err := ns.DeleteNestedBucket(bucketCredits); err != nil {
		str := "failed to delete credits bucket"
		return storeError(ErrDatabase, str, err)
	}
	if err := ns.DeleteNestedBucket(bucketDebits); err != nil {
		str := "failed to delete debits bucket"
		return storeError(ErrDatabase, str, err)
	}
	if err := ns.DeleteNestedBucket(bucketUnspent); err != nil {
		str := "failed to delete unspent bucket"
		return storeError(ErrDatabase, str, err)
	}
	if err := ns.DeleteNestedBucket(bucketUnmined); err != nil {
		str := "failed to delete unmined bucket"
		return storeError(ErrDatabase, str, err)
	}
	if err := ns.DeleteNestedBucket(bucketUnminedCredits); err != nil {
		str := "failed to delete unmined credits bucket"
		return storeError(ErrDatabase, str, err)
	}
	if err := ns.DeleteNestedBucket(bucketUnminedInputs); err != nil {
		str := "failed to delete unmined inputs bucket"
		return storeError(ErrDatabase, str, err)
	}

	return nil
}
870615
func (b *Bucket) DelBucket() (err error) {
	for attempt := attempts.Start(); attempt.Next(); {
		req := &request{
			method: "DELETE",
			bucket: b.Name,
			path:   "/",
		}

		err = b.Client.query(req, nil)
		if !shouldRetry(err) {
			break
		}
	}
	return err
}
175230
func (s *AbortMultipartUploadInput) SetBucket(v string) *AbortMultipartUploadInput {
	s.Bucket = &v
	return s
}
1243505
func (s *DeleteBucketAnalyticsConfigurationInput) SetBucket(v string) *DeleteBucketAnalyticsConfigurationInput {
	s.Bucket = &v
	return s
}
874119
func (s *BucketService) DeleteBucket(ctx context.Context, bucketID platform.ID) error {
	span, ctx := tracing.StartSpanFromContext(ctx)
	defer span.Finish()

	bucket, err := s.FindBucketByID(ctx, bucketID)
	if err != nil {
		return err
	}

	// The data is dropped first from the storage engine. If this fails for any
	// reason, then the bucket will still be available in the future to retrieve
	// the orgID, which is needed for the engine.
	if err := s.engine.DeleteBucket(bucket.OrgID, bucketID); err != nil {
		return err
	}
	return s.inner.DeleteBucket(ctx, bucketID)
}
407943
func (s *DeleteBucketTaggingInput) SetBucket(v string) *DeleteBucketTaggingInput {
	s.Bucket = &v
	return s
}
1028609
func (s *DeletePublicAccessBlockInput) SetBucket(v string) *DeletePublicAccessBlockInput {
	s.Bucket = &v
	return s
}
305567
func (s *Service) DeleteBucket(ctx context.Context, id platform.ID) error {
	if _, err := s.FindBucketByID(ctx, id); err != nil {
		return &platform.Error{
			Op:  OpPrefix + platform.OpDeleteBucket,
			Err: err,
		}
	}
	s.bucketKV.Delete(id.String())

	// return s.deleteLabel(ctx, platform.LabelFilter{ResourceID: id})
	return nil
}
1004487
func (s *ListBucketAnalyticsConfigurationsInput) SetBucket(v string) *ListBucketAnalyticsConfigurationsInput {
	s.Bucket = &v
	return s
}