/// <summary>
 /// Asynchronously deletes the specified model.
 /// This method just creates a <see cref="ModelReference"/> and delegates to <see cref="DeleteModelAsync(ModelReference, DeleteModelOptions, CancellationToken)"/>.
 /// </summary>
 /// <param name="projectId">The project ID. Must not be null.</param>
 /// <param name="datasetId">The dataset ID. Must not be null.</param>
 /// <param name="modelId">The model 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.</returns>
 public virtual Task DeleteModelAsync(string projectId, string datasetId, string modelId, DeleteModelOptions options = null, CancellationToken cancellationToken = default) =>
 DeleteModelAsync(GetModelReference(projectId, datasetId, modelId), options, cancellationToken);
 /// <summary>
 /// Asynchronously deletes the specified model.
 /// </summary>
 /// <param name="modelReference">A fully-qualified identifier for the model. 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.</returns>
 public virtual Task DeleteModelAsync(ModelReference modelReference, DeleteModelOptions options = null, CancellationToken cancellationToken = default) =>
 throw new NotImplementedException();
 /// <summary>
 /// Deletes the specified model.
 /// This method just creates a <see cref="ModelReference"/> and delegates to <see cref="DeleteModel(ModelReference, DeleteModelOptions)"/>.
 /// </summary>
 /// <param name="projectId">The project ID. Must not be null.</param>
 /// <param name="datasetId">The dataset ID. Must not be null.</param>
 /// <param name="modelId">The model 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>
 public virtual void DeleteModel(string projectId, string datasetId, string modelId, DeleteModelOptions options = null) =>
 DeleteModel(GetModelReference(projectId, datasetId, modelId), options);
 /// <summary>
 /// Deletes the specified model.
 /// </summary>
 /// <param name="modelReference">A fully-qualified identifier for the model. Must not be null.</param>
 /// <param name="options">The options for the operation. May be null, in which case defaults will be supplied.</param>
 public virtual void DeleteModel(ModelReference modelReference, DeleteModelOptions options = null) =>
 throw new NotImplementedException();
 /// <summary>
 /// Deletes this model.
 /// This method just creates a <see cref="ModelReference"/> and delegates to <see cref="BigQueryClient.DeleteModel(ModelReference, DeleteModelOptions)"/>.
 /// </summary>
 /// <param name="options">The options for the operation. May be null, in which case defaults will be supplied.</param>
 public void Delete(DeleteModelOptions options = null) => _client.DeleteModel(Reference, options);
 /// <summary>
 /// Asynchronously deletes this model.
 /// This method just creates a <see cref="ModelReference"/> and delegates to <see cref="BigQueryClient.DeleteModelAsync(ModelReference, DeleteModelOptions, 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.</returns>
 public Task DeleteAsync(DeleteModelOptions options = null, CancellationToken cancellationToken = default) =>
 _client.DeleteModelAsync(Reference, options, cancellationToken);
 /// <inheritdoc />
 public override async Task DeleteModelAsync(ModelReference modelReference, DeleteModelOptions options = null, CancellationToken cancellationToken = default)
 {
     var request = CreateDeleteModelRequest(modelReference, options);
     await request.ExecuteAsync().ConfigureAwait(false);
 }
        /// <inheritdoc />
        public override void DeleteModel(ModelReference modelReference, DeleteModelOptions options = null)
        {
            var request = CreateDeleteModelRequest(modelReference, options);

            request.Execute();
        }
        private DeleteRequest CreateDeleteModelRequest(ModelReference modelReference, DeleteModelOptions options)
        {
            GaxPreconditions.CheckNotNull(modelReference, nameof(modelReference));
            var request = Service.Models.Delete(modelReference.ProjectId, modelReference.DatasetId, modelReference.ModelId);

            options?.ModifyRequest(request);
            return(request);
        }