Skip to content

Commit

Permalink
feat(storage): add getbucket generation , get soft deleted bucket and…
Browse files Browse the repository at this point in the history
… related test cases

feat(storage): add listsoftdeleted bucket and related test cases
  • Loading branch information
mahendra-google committed Jan 28, 2025
1 parent db71efc commit cb1650a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
// limitations under the License.

using Google.Api.Gax;
using Google.Apis.Auth.OAuth2;
using Google.Apis.Storage.v1.Data;
using System;
using System.Net.Sockets;
using static Google.Apis.Storage.v1.BucketsResource;
using static Google.Apis.Storage.v1.BucketsResource.GetRequest;

Expand Down Expand Up @@ -53,13 +56,22 @@ public sealed class GetBucketOptions
public RetryOptions RetryOptions { get; set; }

/// <summary>
<<<<<<< HEAD
/// The bucket generation to be retrieved. It must be set if <see ref="SoftDelete" /> is true.
=======
/// Retrieves the generation for the bucket.
>>>>>>> e5dd76feb6 (feat(storage): add getbucket generation , get soft deleted bucket and related test cases)
/// </summary>
public long? Generation { get; set; }

/// <summary>
<<<<<<< HEAD
/// If true, the soft-deleted version of the bucket will be retrieved.
/// If true, <see ref="Generation" /> must be set.
=======
/// (Optional) Set to true to retrieve a soft-deleted bucket .It will return the bucket metadata only if the bucket exists and is in a soft-deleted state.
/// The bucket generation must be set if soft_deleted is set to true
>>>>>>> e5dd76feb6 (feat(storage): add getbucket generation , get soft deleted bucket and related test cases)
/// </summary>
public bool? SoftDeleted { get; set; }

Expand Down Expand Up @@ -92,9 +104,15 @@ internal void ModifyRequest(GetRequest request)
}
if (SoftDeleted != null)
{
<<<<<<< HEAD
request.SoftDeleted = SoftDeleted;
}

=======
request.SoftDeleted = SoftDeleted;
}

>>>>>>> e5dd76feb6 (feat(storage): add getbucket generation , get soft deleted bucket and related test cases)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ public sealed class ListBucketsOptions
/// Options to pass custom retry configuration for each API request.
/// </summary>
public RetryOptions RetryOptions { get; set; }

/// <summary>
/// (Optional) Set to true to retrieve a soft-deleted bucket .It will return the bucket metadata only if the bucket exists and is in a soft-deleted state.
/// The bucket generation must be set if soft_deleted is set to true
/// </summary>
public bool? SoftDeleted { get; set; }
/// <summary>
/// If true, only soft-deleted buckets will be listed. The default is false.
/// </summary>
Expand Down

0 comments on commit cb1650a

Please sign in to comment.