private ListRequest CreateListJobsRequest(ProjectReference projectReference, ListJobsOptions options = null)
        {
            var request = Service.Jobs.List(projectReference.ProjectId);

            options?.ModifyRequest(request);
            return(request);
        }
        private ListRequest CreateListJobsRequest(ProjectReference projectReference, ListJobsOptions options)
        {
            var request = Service.Jobs.List(projectReference.ProjectId);

            options?.ModifyRequest(request);
            RetryHandler.MarkAsRetriable(request);
            return(request);
        }
 /// <summary>
 /// Asynchronously lists the jobs within the specified project.
 /// </summary>
 /// <param name="projectReference">A fully-qualified identifier for the project. 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>An asynchronous sequence of the jobs within the specified project.</returns>
 public virtual PagedAsyncEnumerable <JobList, BigQueryJob> ListJobsAsync(ProjectReference projectReference, ListJobsOptions options = null)
 {
     throw new NotImplementedException();
 }
 /// <summary>
 /// Asynchronously lists the jobs within the specified project.
 /// This method just creates a <see cref="ProjectReference"/> and delegates to <see cref="ListJobsAsync(ProjectReference, ListJobsOptions)"/>.
 /// </summary>
 /// <param name="projectId">The project to list the jobs 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>An asynchronous sequence of the jobs within the specified project.</returns>
 public virtual PagedAsyncEnumerable <JobList, BigQueryJob> ListJobsAsync(string projectId, ListJobsOptions options = null) =>
 ListJobsAsync(GetProjectReference(projectId), options);
 /// <summary>
 /// Lists the jobs within this client's project.
 /// This method just creates a <see cref="ProjectReference"/> and delegates to <see cref="ListJobs(ProjectReference, ListJobsOptions)"/>.
 /// </summary>
 /// <param name="options">The options for the operation. May be null, in which case defaults will be supplied.</param>
 /// <returns>A sequence of the jobs within this project.</returns>
 public virtual PagedEnumerable <JobList, BigQueryJob> ListJobs(ListJobsOptions options = null) =>
 ListJobs(GetProjectReference(ProjectId), options);
        /// <inheritdoc />
        public override PagedAsyncEnumerable <JobList, BigQueryJob> ListJobsAsync(ProjectReference projectReference, ListJobsOptions options = null)
        {
            GaxPreconditions.CheckNotNull(projectReference, nameof(projectReference));

            var pageManager = new JobPageManager(this);

            return(new RestPagedAsyncEnumerable <ListRequest, JobList, BigQueryJob>(
                       () => CreateListJobsRequest(projectReference, options),
                       pageManager));
        }