/// <summary> /// Asynchronously patches this dataset with fields in the specified resource. /// </summary> /// <remarks> /// This method delegates to <see cref="BigQueryClient.PatchDatasetAsync(DatasetReference, Dataset, PatchDatasetOptions, CancellationToken)"/>. /// </remarks> /// <param name="resource">The resource to patch with. Must not be null.</param> /// <param name="matchETag">If true, the etag from <see cref="Resource"/> is propagated into <paramref name="resource"/> for /// optimistic concurrency. Otherwise, <paramref name="resource"/> is left unchanged.</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 updated dataset.</returns> public Task <BigQueryDataset> PatchAsync(Dataset resource, bool matchETag, PatchDatasetOptions options = null, CancellationToken cancellationToken = default) { if (matchETag) { resource.ETag = Resource.ETag; } return(_client.PatchDatasetAsync(Reference, resource, options, cancellationToken)); }