Example #1
0
        /// <inheritdoc />
        public override BigqueryJob GetJob(JobReference jobReference, GetJobOptions options = null)
        {
            GaxRestPreconditions.CheckNotNull(jobReference, nameof(jobReference));

            var request = Service.Jobs.Get(jobReference.ProjectId, jobReference.JobId);

            options?.ModifyRequest(request);
            var job = request.Execute();

            return(new BigqueryJob(this, job));
        }
        /// <inheritdoc />
        public override async Task <BigqueryJob> GetJobAsync(JobReference jobReference, GetJobOptions options = null,
                                                             CancellationToken cancellationToken = default(CancellationToken))
        {
            GaxPreconditions.CheckNotNull(jobReference, nameof(jobReference));

            var request = Service.Jobs.Get(jobReference.ProjectId, jobReference.JobId);

            options?.ModifyRequest(request);
            var job = await request.ExecuteAsync(cancellationToken).ConfigureAwait(false);

            return(new BigqueryJob(this, job));
        }