コード例 #1
0
 /// <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();
 }
コード例 #2
0
 /// <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);
コード例 #3
0
 /// <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);
コード例 #4
0
 /// <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);
コード例 #5
0
        /// <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));
        }
コード例 #6
0
        private ListRequest CreateListModelsRequest(DatasetReference datasetReference, ListModelsOptions options)
        {
            var request = Service.Models.List(datasetReference.ProjectId, datasetReference.DatasetId);

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