Exemple #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));
        }
Exemple #2
0
 /// <summary>
 /// Asynchronously cancels a job.
 /// </summary>
 /// <param name="jobReference">A fully-qualified identifier for the job. Must not be null.</param>
 /// <param name="options">The options for the operation. May be null, in which case defaults will be supplied.</param>
 /// <param name="cancellationToken">The token to monitor for cancellation requests.</param>
 /// <returns>A task representing the asynchronous operation. When complete, the result is
 /// the final state of job.</returns>
 public virtual Task <BigqueryJob> CancelJobAsync(JobReference jobReference, CancelJobOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
 {
     throw new NotImplementedException();
 }
Exemple #3
0
 /// <summary>
 /// Asynchronously cancels the job with the specified project ID and job ID.
 /// This method just creates a <see cref="JobReference"/> and delegates to <see cref="CancelJobAsync(JobReference, CancelJobOptions,CancellationToken)"/>.
 /// </summary>
 /// <param name="projectId">The project ID. Must not be null.</param>
 /// <param name="jobId">The job ID. Must not be null.</param>
 /// <param name="options">The options for the operation. May be null, in which case defaults will be supplied.</param>
 /// <param name="cancellationToken">The token to monitor for cancellation requests.</param>
 /// <returns>A task representing the asynchronous operation. When complete, the result is
 /// the final state of job.</returns>
 public virtual Task <BigqueryJob> CancelJobAsync(string projectId, string jobId, CancelJobOptions options = null, CancellationToken cancellationToken = default(CancellationToken)) =>
 CancelJobAsync(GetJobReference(projectId, jobId), options, cancellationToken);
Exemple #4
0
 /// <summary>
 /// Cancels a job.
 /// </summary>
 /// <param name="jobReference">A fully-qualified identifier for the job. 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>The final state of the job.</returns>
 public virtual BigqueryJob CancelJob(JobReference jobReference, CancelJobOptions options = null)
 {
     throw new NotImplementedException();
 }
Exemple #5
0
 /// <summary>
 /// Cancels the job with the specified project ID and job ID.
 /// This method just creates a <see cref="JobReference"/> and delegates to <see cref="CancelJob(JobReference, CancelJobOptions)"/>.
 /// </summary>
 /// <param name="projectId">The project ID. Must not be null.</param>
 /// <param name="jobId">The job ID. 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>The final state of the job.</returns>
 public virtual BigqueryJob CancelJob(string projectId, string jobId, CancelJobOptions options = null) =>
 CancelJob(GetJobReference(projectId, jobId), options);
 /// <summary>
 /// Cancels this job.
 /// </summary>
 /// <param name="options">The options for the operation. May be null, in which case defaults will be supplied.</param>
 public void Cancel(CancelJobOptions options = null) => _client.CancelJob(Reference, options);
        /// <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));
        }
 /// <summary>
 /// Asynchronously cancels this job.
 /// This method just creates a <see cref="JobReference"/> and delegates to <see cref="BigqueryClient.CancelJobAsync(JobReference, CancelJobOptions, CancellationToken)"/>.
 /// </summary>
 /// <param name="options">The options for the operation. May be null, in which case defaults will be supplied.</param>
 /// <param name="cancellationToken">The token to monitor for cancellation requests.</param>
 /// <returns>A task representing the asynchronous operation. When complete, the result is
 /// the final state of the job.</returns>
 public Task <BigqueryJob> CancelAsync(CancelJobOptions options = null, CancellationToken cancellationToken = default(CancellationToken)) =>
 _client.CancelJobAsync(Reference, options, cancellationToken);
 /// <summary>
 /// Cancels this job.
 /// This method just creates a <see cref="JobReference"/> and delegates to <see cref="BigqueryClient.CancelJob(JobReference, CancelJobOptions)"/>.
 /// </summary>
 /// <param name="options">The options for the operation. May be null, in which case defaults will be supplied.</param>
 /// <returns>The final state of the job.</returns>
 public BigqueryJob Cancel(CancelJobOptions options = null) => _client.CancelJob(Reference, options);