Beispiel #1
0
        /// <inheritdoc />
        public override BigqueryJob CancelJob(JobReference jobReference, CancelJobOptions options = null)
        {
            GaxRestPreconditions.CheckNotNull(jobReference, nameof(jobReference));
            var request = Service.Jobs.Cancel(jobReference.ProjectId, jobReference.JobId);

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

            return(new BigqueryJob(this, job));
        }
        /// <inheritdoc />
        public override async Task <BigqueryJob> CancelJobAsync(JobReference jobReference, CancelJobOptions options = null,
                                                                CancellationToken cancellationToken = default(CancellationToken))
        {
            GaxPreconditions.CheckNotNull(jobReference, nameof(jobReference));
            var request = Service.Jobs.Cancel(jobReference.ProjectId, jobReference.JobId);

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

            return(new BigqueryJob(this, result.Job));
        }