/// <inheritdoc /> public override PagedAsyncEnumerable <ListRoutinesResponse, BigQueryRoutine> ListRoutinesAsync(DatasetReference datasetReference, ListRoutinesOptions options = null) { GaxPreconditions.CheckNotNull(datasetReference, nameof(datasetReference)); var pageManager = new RoutinePageManager(this); return(new RestPagedAsyncEnumerable <ListRequest, ListRoutinesResponse, BigQueryRoutine>( () => CreateListRoutinesRequest(datasetReference, options), pageManager)); }
private ListRequest CreateListRoutinesRequest(DatasetReference datasetReference, ListRoutinesOptions options) { var request = Service.Routines.List(datasetReference.ProjectId, datasetReference.DatasetId); options?.ModifyRequest(request); RetryHandler.MarkAsRetriable(request); request.PrettyPrint = PrettyPrint; return(request); }
/// <summary> /// Lists the routines in a dataset specified by dataset ID, where the dataset is in this client's project. /// This method just creates a <see cref="DatasetReference"/> and delegates to <see cref="ListRoutinesAsync(DatasetReference, ListRoutinesOptions)"/>. /// </summary> /// <remarks> /// <para> /// The returned routines will contain populated properties as specified by <see cref="ListRoutinesOptions.ReadMask"/> /// or the default ones. <see cref="ListRoutinesOptions.ReadMask"/> for more information. /// </para> /// <para> /// No network requests are made until the returned sequence is enumerated. /// This means that any exception due to an invalid request will be deferred until that time. Callers should be prepared /// for exceptions to be thrown while enumerating the results. In addition to failures due to invalid requests, network /// or service failures can cause exceptions even after the first results have been returned. /// </para> /// </remarks> /// <param name="datasetId">The ID of the dataset to list routines from. 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>An asynchronous sequence of routines within the dataset.</returns> public virtual PagedAsyncEnumerable <ListRoutinesResponse, BigQueryRoutine> ListRoutinesAsync(string datasetId, ListRoutinesOptions options = null) => ListRoutinesAsync(GetDatasetReference(datasetId), options);
/// <summary> /// Lists the routines in a dataset. /// </summary> /// <remarks> /// <para> /// The returned routines will contain populated properties as specified by <see cref="ListRoutinesOptions.ReadMask"/> /// or the default ones. <see cref="ListRoutinesOptions.ReadMask"/> for more information. /// </para> /// <para> /// No network requests are made until the returned sequence is enumerated. /// This means that any exception due to an invalid request will be deferred until that time. Callers should be prepared /// for exceptions to be thrown while enumerating the results. In addition to failures due to invalid requests, network /// or service failures can cause exceptions even after the first results have been returned. /// </para> /// </remarks> /// <param name="datasetReference">A fully-qualified identifier for the dataset. 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>A sequence of routines within the dataset.</returns> public virtual PagedAsyncEnumerable <ListRoutinesResponse, BigQueryRoutine> ListRoutinesAsync(DatasetReference datasetReference, ListRoutinesOptions options = null) => throw new NotImplementedException();
/// <summary> /// Lists the routines in a dataset specified by project ID and dataset ID. /// This method just creates a <see cref="DatasetReference"/> and delegates to <see cref="ListRoutines(DatasetReference, ListRoutinesOptions)"/>. /// </summary> /// <remarks> /// <para> /// The returned routines will contain populated properties as specified by <see cref="ListRoutinesOptions.ReadMask"/> /// or the default ones. <see cref="ListRoutinesOptions.ReadMask"/> for more information. /// </para> /// <para> /// No network requests are made until the returned sequence is enumerated. /// This means that any exception due to an invalid request will be deferred until that time. Callers should be prepared /// for exceptions to be thrown while enumerating the results. In addition to failures due to invalid requests, network /// or service failures can cause exceptions even after the first results have been returned. /// </para> /// </remarks> /// <param name="projectId">The ID of the project containing the dataset. Must not be null.</param> /// <param name="datasetId">The ID of the dataset to list routines from. 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>A sequence of routines within the dataset.</returns> public virtual PagedEnumerable <ListRoutinesResponse, BigQueryRoutine> ListRoutines(string projectId, string datasetId, ListRoutinesOptions options = null) => ListRoutines(GetDatasetReference(projectId, datasetId), options);