private BucketsResource.ListRequest CreateListBucketsRequest(string projectId, ListBucketsOptions options)
        {
            var request = Service.Buckets.List(projectId);

            options?.ModifyRequest(request);
            return(request);
        }
 /// <summary>
 /// Lists the buckets for a given project, synchronously but lazily.
 /// </summary>
 /// <remarks>
 /// This method fetches the buckets lazily, making requests to the underlying service
 /// for a page of results at a time, as required.
 /// </remarks>
 /// <param name="projectId">The ID of the project to list the buckets from. Must not be null.</param>
 /// <param name="options">The options for the operation. May be null, in which case
 /// defaults will be supplied.</param>
 /// <returns>A sequence of buckets within the project.</returns>
 public virtual PagedEnumerable <Buckets, Bucket> ListBuckets(string projectId, ListBucketsOptions options = null)
 {
     throw new NotImplementedException();
 }
 /// <inheritdoc />
 public override PagedEnumerable <Buckets, Bucket> ListBuckets(string projectId, ListBucketsOptions options = null)
 {
     GaxPreconditions.CheckNotNull(projectId, nameof(projectId));
     return(new RestPagedEnumerable <BucketsResource.ListRequest, Buckets, Bucket>(
                () => CreateListBucketsRequest(projectId, options), BucketPageManager.Instance));
 }