/// <summary> /// Lists the models in a dataset. /// </summary> /// <remarks> /// <para> /// The returned models will not have all the properties in the resource populated. For complete information, make a GetModel /// call for each model you need the details of. /// </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 models within the dataset.</returns> public virtual PagedAsyncEnumerable <ListModelsResponse, BigQueryModel> ListModelsAsync(DatasetReference datasetReference, ListModelsOptions options = null) { throw new NotImplementedException(); }
/// <summary> /// Lists the models 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="ListModelsAsync(DatasetReference, ListModelsOptions)"/>. /// </summary> /// <remarks> /// <para> /// The returned models will not have all the properties in the resource populated. For complete information, make a GetModel /// call for each model you need the details of. /// </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 models 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 models within the dataset.</returns> public virtual PagedAsyncEnumerable <ListModelsResponse, BigQueryModel> ListModelsAsync(string datasetId, ListModelsOptions options = null) => ListModelsAsync(GetDatasetReference(datasetId), options);
/// <summary> /// Lists the models in a dataset specified by project ID and dataset ID. /// This method just creates a <see cref="DatasetReference"/> and delegates to <see cref="ListModels(DatasetReference, ListModelsOptions)"/>. /// </summary> /// <remarks> /// <para> /// The returned models will not have all the properties in the resource populated. For complete information, make a GetModel /// call for each model you need the details of. /// </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 models 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 models within the dataset.</returns> public virtual PagedEnumerable <ListModelsResponse, BigQueryModel> ListModels(string projectId, string datasetId, ListModelsOptions options = null) => ListModels(GetDatasetReference(projectId, datasetId), options);
/// <summary> /// Asynchronously lists the models within this dataset. /// This method just creates a <see cref="DatasetReference"/> and delegates to <see cref="BigQueryClient.ListModelsAsync(DatasetReference, ListModelsOptions)"/>. /// </summary> /// <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> /// <param name="options">The options for the operation. May be null, in which case defaults will be supplied.</param> /// <returns>An asynchronous sequence of models within this dataset.</returns> public PagedAsyncEnumerable <ListModelsResponse, BigQueryModel> ListModelsAsync(ListModelsOptions options = null) => _client.ListModelsAsync(Reference, options);
/// <inheritdoc /> public override PagedEnumerable <ListModelsResponse, BigQueryModel> ListModels(DatasetReference datasetReference, ListModelsOptions options = null) { GaxPreconditions.CheckNotNull(datasetReference, nameof(datasetReference)); var pageManager = new ModelPageManager(this); return(new RestPagedEnumerable <ListRequest, ListModelsResponse, BigQueryModel>( () => CreateListModelsRequest(datasetReference, options), pageManager)); }
private ListRequest CreateListModelsRequest(DatasetReference datasetReference, ListModelsOptions options) { var request = Service.Models.List(datasetReference.ProjectId, datasetReference.DatasetId); options?.ModifyRequest(request); RetryHandler.MarkAsRetriable(request); return(request); }