UNPKG

157 kBTypeScriptView Raw
1/**
2 * BigQuery API
3 */
4declare namespace bigquery {
5 /**
6 * Aggregate metrics for classification/classifier models. For multi-class models, the metrics are either macro-averaged or micro-averaged. When macro-averaged, the metrics are calculated for each label and then an unweighted average is taken of those values. When micro-averaged, the metric is calculated globally by counting the total number of correctly predicted rows.
7 */
8 type IAggregateClassificationMetrics = {
9 /**
10 * Accuracy is the fraction of predictions given the correct label. For multiclass this is a micro-averaged metric.
11 */
12 accuracy?: number;
13 /**
14 * The F1 score is an average of recall and precision. For multiclass this is a macro-averaged metric.
15 */
16 f1Score?: number;
17 /**
18 * Logarithmic Loss. For multiclass this is a macro-averaged metric.
19 */
20 logLoss?: number;
21 /**
22 * Precision is the fraction of actual positive predictions that had positive actual labels. For multiclass this is a macro-averaged metric treating each class as a binary classifier.
23 */
24 precision?: number;
25 /**
26 * Recall is the fraction of actual positive labels that were given a positive prediction. For multiclass this is a macro-averaged metric.
27 */
28 recall?: number;
29 /**
30 * Area Under a ROC Curve. For multiclass this is a macro-averaged metric.
31 */
32 rocAuc?: number;
33 /**
34 * Threshold at which the metrics are computed. For binary classification models this is the positive class threshold. For multi-class classfication models this is the confidence threshold.
35 */
36 threshold?: number;
37 };
38
39 /**
40 * Input/output argument of a function or a stored procedure.
41 */
42 type IArgument = {
43 /**
44 * Optional. Defaults to FIXED_TYPE.
45 */
46 argumentKind?: 'ARGUMENT_KIND_UNSPECIFIED' | 'FIXED_TYPE' | 'ANY_TYPE';
47 /**
48 * Required unless argument_kind = ANY_TYPE.
49 */
50 dataType?: IStandardSqlDataType;
51 /**
52 * Optional. Specifies whether the argument is input or output. Can be set for procedures only.
53 */
54 mode?: 'MODE_UNSPECIFIED' | 'IN' | 'OUT' | 'INOUT';
55 /**
56 * Optional. The name of this argument. Can be absent for function return argument.
57 */
58 name?: string;
59 };
60
61 /**
62 * Arima coefficients.
63 */
64 type IArimaCoefficients = {
65 /**
66 * Auto-regressive coefficients, an array of double.
67 */
68 autoRegressiveCoefficients?: Array<number>;
69 /**
70 * Intercept coefficient, just a double not an array.
71 */
72 interceptCoefficient?: number;
73 /**
74 * Moving-average coefficients, an array of double.
75 */
76 movingAverageCoefficients?: Array<number>;
77 };
78
79 /**
80 * ARIMA model fitting metrics.
81 */
82 type IArimaFittingMetrics = {
83 /**
84 * AIC.
85 */
86 aic?: number;
87 /**
88 * Log-likelihood.
89 */
90 logLikelihood?: number;
91 /**
92 * Variance.
93 */
94 variance?: number;
95 };
96
97 /**
98 * Model evaluation metrics for ARIMA forecasting models.
99 */
100 type IArimaForecastingMetrics = {
101 /**
102 * Arima model fitting metrics.
103 */
104 arimaFittingMetrics?: Array<IArimaFittingMetrics>;
105 /**
106 * Repeated as there can be many metric sets (one for each model) in auto-arima and the large-scale case.
107 */
108 arimaSingleModelForecastingMetrics?: Array<
109 IArimaSingleModelForecastingMetrics
110 >;
111 /**
112 * Whether Arima model fitted with drift or not. It is always false when d is not 1.
113 */
114 hasDrift?: Array<boolean>;
115 /**
116 * Non-seasonal order.
117 */
118 nonSeasonalOrder?: Array<IArimaOrder>;
119 /**
120 * Seasonal periods. Repeated because multiple periods are supported for one time series.
121 */
122 seasonalPeriods?: Array<
123 | 'SEASONAL_PERIOD_TYPE_UNSPECIFIED'
124 | 'NO_SEASONALITY'
125 | 'DAILY'
126 | 'WEEKLY'
127 | 'MONTHLY'
128 | 'QUARTERLY'
129 | 'YEARLY'
130 >;
131 /**
132 * Id to differentiate different time series for the large-scale case.
133 */
134 timeSeriesId?: Array<string>;
135 };
136
137 /**
138 * Arima model information.
139 */
140 type IArimaModelInfo = {
141 /**
142 * Arima coefficients.
143 */
144 arimaCoefficients?: IArimaCoefficients;
145 /**
146 * Arima fitting metrics.
147 */
148 arimaFittingMetrics?: IArimaFittingMetrics;
149 /**
150 * Whether Arima model fitted with drift or not. It is always false when d is not 1.
151 */
152 hasDrift?: boolean;
153 /**
154 * Non-seasonal order.
155 */
156 nonSeasonalOrder?: IArimaOrder;
157 /**
158 * Seasonal periods. Repeated because multiple periods are supported for one time series.
159 */
160 seasonalPeriods?: Array<
161 | 'SEASONAL_PERIOD_TYPE_UNSPECIFIED'
162 | 'NO_SEASONALITY'
163 | 'DAILY'
164 | 'WEEKLY'
165 | 'MONTHLY'
166 | 'QUARTERLY'
167 | 'YEARLY'
168 >;
169 /**
170 * The id to indicate different time series.
171 */
172 timeSeriesId?: string;
173 };
174
175 /**
176 * Arima order, can be used for both non-seasonal and seasonal parts.
177 */
178 type IArimaOrder = {
179 /**
180 * Order of the differencing part.
181 */
182 d?: string;
183 /**
184 * Order of the autoregressive part.
185 */
186 p?: string;
187 /**
188 * Order of the moving-average part.
189 */
190 q?: string;
191 };
192
193 /**
194 * (Auto-)arima fitting result. Wrap everything in ArimaResult for easier refactoring if we want to use model-specific iteration results.
195 */
196 type IArimaResult = {
197 /**
198 * This message is repeated because there are multiple arima models fitted in auto-arima. For non-auto-arima model, its size is one.
199 */
200 arimaModelInfo?: Array<IArimaModelInfo>;
201 /**
202 * Seasonal periods. Repeated because multiple periods are supported for one time series.
203 */
204 seasonalPeriods?: Array<
205 | 'SEASONAL_PERIOD_TYPE_UNSPECIFIED'
206 | 'NO_SEASONALITY'
207 | 'DAILY'
208 | 'WEEKLY'
209 | 'MONTHLY'
210 | 'QUARTERLY'
211 | 'YEARLY'
212 >;
213 };
214
215 /**
216 * Model evaluation metrics for a single ARIMA forecasting model.
217 */
218 type IArimaSingleModelForecastingMetrics = {
219 /**
220 * Arima fitting metrics.
221 */
222 arimaFittingMetrics?: IArimaFittingMetrics;
223 /**
224 * Is arima model fitted with drift or not. It is always false when d is not 1.
225 */
226 hasDrift?: boolean;
227 /**
228 * Non-seasonal order.
229 */
230 nonSeasonalOrder?: IArimaOrder;
231 /**
232 * Seasonal periods. Repeated because multiple periods are supported for one time series.
233 */
234 seasonalPeriods?: Array<
235 | 'SEASONAL_PERIOD_TYPE_UNSPECIFIED'
236 | 'NO_SEASONALITY'
237 | 'DAILY'
238 | 'WEEKLY'
239 | 'MONTHLY'
240 | 'QUARTERLY'
241 | 'YEARLY'
242 >;
243 /**
244 * The id to indicate different time series.
245 */
246 timeSeriesId?: string;
247 };
248
249 /**
250 * Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { "audit_configs": [ { "service": "allServices", "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { "log_type": "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.
251 */
252 type IAuditConfig = {
253 /**
254 * The configuration for logging of each type of permission.
255 */
256 auditLogConfigs?: Array<IAuditLogConfig>;
257 /**
258 * Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
259 */
260 service?: string;
261 };
262
263 /**
264 * Provides the configuration for logging a type of permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.
265 */
266 type IAuditLogConfig = {
267 /**
268 * Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.
269 */
270 exemptedMembers?: Array<string>;
271 /**
272 * The log type that this config enables.
273 */
274 logType?:
275 | 'LOG_TYPE_UNSPECIFIED'
276 | 'ADMIN_READ'
277 | 'DATA_WRITE'
278 | 'DATA_READ';
279 };
280
281 type IBigQueryModelTraining = {
282 /**
283 * [Output-only, Beta] Index of current ML training iteration. Updated during create model query job to show job progress.
284 */
285 currentIteration?: number;
286 /**
287 * [Output-only, Beta] Expected number of iterations for the create model query job specified as num_iterations in the input query. The actual total number of iterations may be less than this number due to early stop.
288 */
289 expectedTotalIterations?: string;
290 };
291
292 type IBigtableColumn = {
293 /**
294 * [Optional] The encoding of the values when the type is not STRING. Acceptable encoding values are: TEXT - indicates values are alphanumeric text strings. BINARY - indicates values are encoded using HBase Bytes.toBytes family of functions. 'encoding' can also be set at the column family level. However, the setting at this level takes precedence if 'encoding' is set at both levels.
295 */
296 encoding?: string;
297 /**
298 * [Optional] If the qualifier is not a valid BigQuery field identifier i.e. does not match [a-zA-Z][a-zA-Z0-9_]*, a valid identifier must be provided as the column field name and is used as field name in queries.
299 */
300 fieldName?: string;
301 /**
302 * [Optional] If this is set, only the latest version of value in this column are exposed. 'onlyReadLatest' can also be set at the column family level. However, the setting at this level takes precedence if 'onlyReadLatest' is set at both levels.
303 */
304 onlyReadLatest?: boolean;
305 /**
306 * [Required] Qualifier of the column. Columns in the parent column family that has this exact qualifier are exposed as . field. If the qualifier is valid UTF-8 string, it can be specified in the qualifier_string field. Otherwise, a base-64 encoded value must be set to qualifier_encoded. The column field name is the same as the column qualifier. However, if the qualifier is not a valid BigQuery field identifier i.e. does not match [a-zA-Z][a-zA-Z0-9_]*, a valid identifier must be provided as field_name.
307 */
308 qualifierEncoded?: string;
309 qualifierString?: string;
310 /**
311 * [Optional] The type to convert the value in cells of this column. The values are expected to be encoded using HBase Bytes.toBytes function when using the BINARY encoding value. Following BigQuery types are allowed (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Default type is BYTES. 'type' can also be set at the column family level. However, the setting at this level takes precedence if 'type' is set at both levels.
312 */
313 type?: string;
314 };
315
316 type IBigtableColumnFamily = {
317 /**
318 * [Optional] Lists of columns that should be exposed as individual fields as opposed to a list of (column name, value) pairs. All columns whose qualifier matches a qualifier in this list can be accessed as .. Other columns can be accessed as a list through .Column field.
319 */
320 columns?: Array<IBigtableColumn>;
321 /**
322 * [Optional] The encoding of the values when the type is not STRING. Acceptable encoding values are: TEXT - indicates values are alphanumeric text strings. BINARY - indicates values are encoded using HBase Bytes.toBytes family of functions. This can be overridden for a specific column by listing that column in 'columns' and specifying an encoding for it.
323 */
324 encoding?: string;
325 /**
326 * Identifier of the column family.
327 */
328 familyId?: string;
329 /**
330 * [Optional] If this is set only the latest version of value are exposed for all columns in this column family. This can be overridden for a specific column by listing that column in 'columns' and specifying a different setting for that column.
331 */
332 onlyReadLatest?: boolean;
333 /**
334 * [Optional] The type to convert the value in cells of this column family. The values are expected to be encoded using HBase Bytes.toBytes function when using the BINARY encoding value. Following BigQuery types are allowed (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Default type is BYTES. This can be overridden for a specific column by listing that column in 'columns' and specifying a type for it.
335 */
336 type?: string;
337 };
338
339 type IBigtableOptions = {
340 /**
341 * [Optional] List of column families to expose in the table schema along with their types. This list restricts the column families that can be referenced in queries and specifies their value types. You can use this list to do type conversions - see the 'type' field for more details. If you leave this list empty, all column families are present in the table schema and their values are read as BYTES. During a query only the column families referenced in that query are read from Bigtable.
342 */
343 columnFamilies?: Array<IBigtableColumnFamily>;
344 /**
345 * [Optional] If field is true, then the column families that are not specified in columnFamilies list are not exposed in the table schema. Otherwise, they are read with BYTES type values. The default value is false.
346 */
347 ignoreUnspecifiedColumnFamilies?: boolean;
348 /**
349 * [Optional] If field is true, then the rowkey column families will be read and converted to string. Otherwise they are read with BYTES type values and users need to manually cast them with CAST if necessary. The default value is false.
350 */
351 readRowkeyAsString?: boolean;
352 };
353
354 /**
355 * Evaluation metrics for binary classification/classifier models.
356 */
357 type IBinaryClassificationMetrics = {
358 /**
359 * Aggregate classification metrics.
360 */
361 aggregateClassificationMetrics?: IAggregateClassificationMetrics;
362 /**
363 * Binary confusion matrix at multiple thresholds.
364 */
365 binaryConfusionMatrixList?: Array<IBinaryConfusionMatrix>;
366 /**
367 * Label representing the negative class.
368 */
369 negativeLabel?: string;
370 /**
371 * Label representing the positive class.
372 */
373 positiveLabel?: string;
374 };
375
376 /**
377 * Confusion matrix for binary classification models.
378 */
379 type IBinaryConfusionMatrix = {
380 /**
381 * The fraction of predictions given the correct label.
382 */
383 accuracy?: number;
384 /**
385 * The equally weighted average of recall and precision.
386 */
387 f1Score?: number;
388 /**
389 * Number of false samples predicted as false.
390 */
391 falseNegatives?: string;
392 /**
393 * Number of false samples predicted as true.
394 */
395 falsePositives?: string;
396 /**
397 * Threshold value used when computing each of the following metric.
398 */
399 positiveClassThreshold?: number;
400 /**
401 * The fraction of actual positive predictions that had positive actual labels.
402 */
403 precision?: number;
404 /**
405 * The fraction of actual positive labels that were given a positive prediction.
406 */
407 recall?: number;
408 /**
409 * Number of true samples predicted as false.
410 */
411 trueNegatives?: string;
412 /**
413 * Number of true samples predicted as true.
414 */
415 truePositives?: string;
416 };
417
418 /**
419 * Associates `members` with a `role`.
420 */
421 type IBinding = {
422 /**
423 * The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
424 */
425 condition?: IExpr;
426 /**
427 * Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
428 */
429 members?: Array<string>;
430 /**
431 * Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
432 */
433 role?: string;
434 };
435
436 type IBqmlIterationResult = {
437 /**
438 * [Output-only, Beta] Time taken to run the training iteration in milliseconds.
439 */
440 durationMs?: string;
441 /**
442 * [Output-only, Beta] Eval loss computed on the eval data at the end of the iteration. The eval loss is used for early stopping to avoid overfitting. No eval loss if eval_split_method option is specified as no_split or auto_split with input data size less than 500 rows.
443 */
444 evalLoss?: number;
445 /**
446 * [Output-only, Beta] Index of the ML training iteration, starting from zero for each training run.
447 */
448 index?: number;
449 /**
450 * [Output-only, Beta] Learning rate used for this iteration, it varies for different training iterations if learn_rate_strategy option is not constant.
451 */
452 learnRate?: number;
453 /**
454 * [Output-only, Beta] Training loss computed on the training data at the end of the iteration. The training loss function is defined by model type.
455 */
456 trainingLoss?: number;
457 };
458
459 type IBqmlTrainingRun = {
460 /**
461 * [Output-only, Beta] List of each iteration results.
462 */
463 iterationResults?: Array<IBqmlIterationResult>;
464 /**
465 * [Output-only, Beta] Training run start time in milliseconds since the epoch.
466 */
467 startTime?: string;
468 /**
469 * [Output-only, Beta] Different state applicable for a training run. IN PROGRESS: Training run is in progress. FAILED: Training run ended due to a non-retryable failure. SUCCEEDED: Training run successfully completed. CANCELLED: Training run cancelled by the user.
470 */
471 state?: string;
472 /**
473 * [Output-only, Beta] Training options used by this training run. These options are mutable for subsequent training runs. Default values are explicitly stored for options not specified in the input query of the first training run. For subsequent training runs, any option not explicitly specified in the input query will be copied from the previous training run.
474 */
475 trainingOptions?: {
476 earlyStop?: boolean;
477 l1Reg?: number;
478 l2Reg?: number;
479 learnRate?: number;
480 learnRateStrategy?: string;
481 lineSearchInitLearnRate?: number;
482 maxIteration?: string;
483 minRelProgress?: number;
484 warmStart?: boolean;
485 };
486 };
487
488 /**
489 * Representative value of a categorical feature.
490 */
491 type ICategoricalValue = {
492 /**
493 * Counts of all categories for the categorical feature. If there are more than ten categories, we return top ten (by count) and return one more CategoryCount with category "_OTHER_" and count as aggregate counts of remaining categories.
494 */
495 categoryCounts?: Array<ICategoryCount>;
496 };
497
498 /**
499 * Represents the count of a single category within the cluster.
500 */
501 type ICategoryCount = {
502 /**
503 * The name of category.
504 */
505 category?: string;
506 /**
507 * The count of training samples matching the category within the cluster.
508 */
509 count?: string;
510 };
511
512 /**
513 * Message containing the information about one cluster.
514 */
515 type ICluster = {
516 /**
517 * Centroid id.
518 */
519 centroidId?: string;
520 /**
521 * Count of training data rows that were assigned to this cluster.
522 */
523 count?: string;
524 /**
525 * Values of highly variant features for this cluster.
526 */
527 featureValues?: Array<IFeatureValue>;
528 };
529
530 /**
531 * Information about a single cluster for clustering model.
532 */
533 type IClusterInfo = {
534 /**
535 * Centroid id.
536 */
537 centroidId?: string;
538 /**
539 * Cluster radius, the average distance from centroid to each point assigned to the cluster.
540 */
541 clusterRadius?: number;
542 /**
543 * Cluster size, the total number of points assigned to the cluster.
544 */
545 clusterSize?: string;
546 };
547
548 type IClustering = {
549 /**
550 * [Repeated] One or more fields on which data should be clustered. Only top-level, non-repeated, simple-type fields are supported. When you cluster a table using multiple columns, the order of columns you specify is important. The order of the specified columns determines the sort order of the data.
551 */
552 fields?: Array<string>;
553 };
554
555 /**
556 * Evaluation metrics for clustering models.
557 */
558 type IClusteringMetrics = {
559 /**
560 * [Beta] Information for all clusters.
561 */
562 clusters?: Array<ICluster>;
563 /**
564 * Davies-Bouldin index.
565 */
566 daviesBouldinIndex?: number;
567 /**
568 * Mean of squared distances between each sample to its cluster centroid.
569 */
570 meanSquaredDistance?: number;
571 };
572
573 /**
574 * Confusion matrix for multi-class classification models.
575 */
576 type IConfusionMatrix = {
577 /**
578 * Confidence threshold used when computing the entries of the confusion matrix.
579 */
580 confidenceThreshold?: number;
581 /**
582 * One row per actual label.
583 */
584 rows?: Array<IRow>;
585 };
586
587 type IConnectionProperty = {
588 /**
589 * [Required] Name of the connection property to set.
590 */
591 key?: string;
592 /**
593 * [Required] Value of the connection property.
594 */
595 value?: string;
596 };
597
598 type ICsvOptions = {
599 /**
600 * [Optional] Indicates if BigQuery should accept rows that are missing trailing optional columns. If true, BigQuery treats missing trailing columns as null values. If false, records with missing trailing columns are treated as bad records, and if there are too many bad records, an invalid error is returned in the job result. The default value is false.
601 */
602 allowJaggedRows?: boolean;
603 /**
604 * [Optional] Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false.
605 */
606 allowQuotedNewlines?: boolean;
607 /**
608 * [Optional] The character encoding of the data. The supported values are UTF-8 or ISO-8859-1. The default value is UTF-8. BigQuery decodes the data after the raw, binary data has been split using the values of the quote and fieldDelimiter properties.
609 */
610 encoding?: string;
611 /**
612 * [Optional] The separator for fields in a CSV file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. BigQuery also supports the escape sequence "\t" to specify a tab separator. The default value is a comma (',').
613 */
614 fieldDelimiter?: string;
615 /**
616 * [Optional] The value that is used to quote data sections in a CSV file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. The default value is a double-quote ('"'). If your data does not contain quoted sections, set the property value to an empty string. If your data contains quoted newline characters, you must also set the allowQuotedNewlines property to true.
617 */
618 quote?: string;
619 /**
620 * [Optional] The number of rows at the top of a CSV file that BigQuery will skip when reading the data. The default value is 0. This property is useful if you have header rows in the file that should be skipped. When autodetect is on, the behavior is the following: * skipLeadingRows unspecified - Autodetect tries to detect headers in the first row. If they are not detected, the row is read as data. Otherwise data is read starting from the second row. * skipLeadingRows is 0 - Instructs autodetect that there are no headers and data should be read starting from the first row. * skipLeadingRows = N > 0 - Autodetect skips N-1 rows and tries to detect headers in row N. If headers are not detected, row N is just skipped. Otherwise row N is used to extract column names for the detected schema.
621 */
622 skipLeadingRows?: string;
623 };
624
625 /**
626 * Data split result. This contains references to the training and evaluation data tables that were used to train the model.
627 */
628 type IDataSplitResult = {
629 /**
630 * Table reference of the evaluation data after split.
631 */
632 evaluationTable?: ITableReference;
633 /**
634 * Table reference of the training data after split.
635 */
636 trainingTable?: ITableReference;
637 };
638
639 type IDataset = {
640 /**
641 * [Optional] An array of objects that define dataset access for one or more entities. You can set this property when inserting or updating a dataset in order to control who is allowed to access the data. If unspecified at dataset creation time, BigQuery adds default dataset access for the following entities: access.specialGroup: projectReaders; access.role: READER; access.specialGroup: projectWriters; access.role: WRITER; access.specialGroup: projectOwners; access.role: OWNER; access.userByEmail: [dataset creator email]; access.role: OWNER;
642 */
643 access?: Array<{
644 /**
645 * [Pick one] A domain to grant access to. Any users signed in with the domain specified will be granted the specified access. Example: "example.com". Maps to IAM policy member "domain:DOMAIN".
646 */
647 domain?: string;
648 /**
649 * [Pick one] An email address of a Google Group to grant access to. Maps to IAM policy member "group:GROUP".
650 */
651 groupByEmail?: string;
652 /**
653 * [Pick one] Some other type of member that appears in the IAM Policy but isn't a user, group, domain, or special group.
654 */
655 iamMember?: string;
656 /**
657 * [Required] An IAM role ID that should be granted to the user, group, or domain specified in this access entry. The following legacy mappings will be applied: OWNER roles/bigquery.dataOwner WRITER roles/bigquery.dataEditor READER roles/bigquery.dataViewer This field will accept any of the above formats, but will return only the legacy format. For example, if you set this field to "roles/bigquery.dataOwner", it will be returned back as "OWNER".
658 */
659 role?: string;
660 /**
661 * [Pick one] A routine from a different dataset to grant access to. Queries executed against that routine will have read access to views/tables/routines in this dataset. Only UDF is supported for now. The role field is not required when this field is set. If that routine is updated by any user, access to the routine needs to be granted again via an update operation.
662 */
663 routine?: IRoutineReference;
664 /**
665 * [Pick one] A special group to grant access to. Possible values include: projectOwners: Owners of the enclosing project. projectReaders: Readers of the enclosing project. projectWriters: Writers of the enclosing project. allAuthenticatedUsers: All authenticated BigQuery users. Maps to similarly-named IAM members.
666 */
667 specialGroup?: string;
668 /**
669 * [Pick one] An email address of a user to grant access to. For example: fred@example.com. Maps to IAM policy member "user:EMAIL" or "serviceAccount:EMAIL".
670 */
671 userByEmail?: string;
672 /**
673 * [Pick one] A view from a different dataset to grant access to. Queries executed against that view will have read access to tables in this dataset. The role field is not required when this field is set. If that view is updated by any user, access to the view needs to be granted again via an update operation.
674 */
675 view?: ITableReference;
676 }>;
677 /**
678 * [Output-only] The time when this dataset was created, in milliseconds since the epoch.
679 */
680 creationTime?: string;
681 /**
682 * [Required] A reference that identifies the dataset.
683 */
684 datasetReference?: IDatasetReference;
685 defaultEncryptionConfiguration?: IEncryptionConfiguration;
686 /**
687 * [Optional] The default partition expiration for all partitioned tables in the dataset, in milliseconds. Once this property is set, all newly-created partitioned tables in the dataset will have an expirationMs property in the timePartitioning settings set to this value, and changing the value will only affect new tables, not existing ones. The storage in a partition will have an expiration time of its partition time plus this value. Setting this property overrides the use of defaultTableExpirationMs for partitioned tables: only one of defaultTableExpirationMs and defaultPartitionExpirationMs will be used for any new partitioned table. If you provide an explicit timePartitioning.expirationMs when creating or updating a partitioned table, that value takes precedence over the default partition expiration time indicated by this property.
688 */
689 defaultPartitionExpirationMs?: string;
690 /**
691 * [Optional] The default lifetime of all tables in the dataset, in milliseconds. The minimum value is 3600000 milliseconds (one hour). Once this property is set, all newly-created tables in the dataset will have an expirationTime property set to the creation time plus the value in this property, and changing the value will only affect new tables, not existing ones. When the expirationTime for a given table is reached, that table will be deleted automatically. If a table's expirationTime is modified or removed before the table expires, or if you provide an explicit expirationTime when creating a table, that value takes precedence over the default expiration time indicated by this property.
692 */
693 defaultTableExpirationMs?: string;
694 /**
695 * [Optional] A user-friendly description of the dataset.
696 */
697 description?: string;
698 /**
699 * [Output-only] A hash of the resource.
700 */
701 etag?: string;
702 /**
703 * [Optional] A descriptive name for the dataset.
704 */
705 friendlyName?: string;
706 /**
707 * [Output-only] The fully-qualified unique name of the dataset in the format projectId:datasetId. The dataset name without the project name is given in the datasetId field. When creating a new dataset, leave this field blank, and instead specify the datasetId field.
708 */
709 id?: string;
710 /**
711 * [Output-only] The resource type.
712 */
713 kind?: string;
714 /**
715 * The labels associated with this dataset. You can use these to organize and group your datasets. You can set this property when inserting or updating a dataset. See Creating and Updating Dataset Labels for more information.
716 */
717 labels?: {[key: string]: string};
718 /**
719 * [Output-only] The date when this dataset or any of its tables was last modified, in milliseconds since the epoch.
720 */
721 lastModifiedTime?: string;
722 /**
723 * The geographic location where the dataset should reside. The default value is US. See details at https://cloud.google.com/bigquery/docs/locations.
724 */
725 location?: string;
726 /**
727 * [Output-only] Reserved for future use.
728 */
729 satisfiesPZS?: boolean;
730 /**
731 * [Output-only] A URL that can be used to access the resource again. You can use this URL in Get or Update requests to the resource.
732 */
733 selfLink?: string;
734 };
735
736 type IDatasetList = {
737 /**
738 * An array of the dataset resources in the project. Each resource contains basic information. For full information about a particular dataset resource, use the Datasets: get method. This property is omitted when there are no datasets in the project.
739 */
740 datasets?: Array<{
741 /**
742 * The dataset reference. Use this property to access specific parts of the dataset's ID, such as project ID or dataset ID.
743 */
744 datasetReference?: IDatasetReference;
745 /**
746 * A descriptive name for the dataset, if one exists.
747 */
748 friendlyName?: string;
749 /**
750 * The fully-qualified, unique, opaque ID of the dataset.
751 */
752 id?: string;
753 /**
754 * The resource type. This property always returns the value "bigquery#dataset".
755 */
756 kind?: string;
757 /**
758 * The labels associated with this dataset. You can use these to organize and group your datasets.
759 */
760 labels?: {[key: string]: string};
761 /**
762 * The geographic location where the data resides.
763 */
764 location?: string;
765 }>;
766 /**
767 * A hash value of the results page. You can use this property to determine if the page has changed since the last request.
768 */
769 etag?: string;
770 /**
771 * The list type. This property always returns the value "bigquery#datasetList".
772 */
773 kind?: string;
774 /**
775 * A token that can be used to request the next results page. This property is omitted on the final results page.
776 */
777 nextPageToken?: string;
778 };
779
780 type IDatasetReference = {
781 /**
782 * [Required] A unique ID for this dataset, without the project name. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
783 */
784 datasetId?: string;
785 /**
786 * [Optional] The ID of the project containing this dataset.
787 */
788 projectId?: string;
789 };
790
791 type IDestinationTableProperties = {
792 /**
793 * [Optional] The description for the destination table. This will only be used if the destination table is newly created. If the table already exists and a value different than the current description is provided, the job will fail.
794 */
795 description?: string;
796 /**
797 * [Optional] The friendly name for the destination table. This will only be used if the destination table is newly created. If the table already exists and a value different than the current friendly name is provided, the job will fail.
798 */
799 friendlyName?: string;
800 /**
801 * [Optional] The labels associated with this table. You can use these to organize and group your tables. This will only be used if the destination table is newly created. If the table already exists and labels are different than the current labels are provided, the job will fail.
802 */
803 labels?: {[key: string]: string};
804 };
805
806 type IEncryptionConfiguration = {
807 /**
808 * [Optional] Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key.
809 */
810 kmsKeyName?: string;
811 };
812
813 /**
814 * A single entry in the confusion matrix.
815 */
816 type IEntry = {
817 /**
818 * Number of items being predicted as this label.
819 */
820 itemCount?: string;
821 /**
822 * The predicted label. For confidence_threshold > 0, we will also add an entry indicating the number of items under the confidence threshold.
823 */
824 predictedLabel?: string;
825 };
826
827 type IErrorProto = {
828 /**
829 * Debugging information. This property is internal to Google and should not be used.
830 */
831 debugInfo?: string;
832 /**
833 * Specifies where the error occurred, if present.
834 */
835 location?: string;
836 /**
837 * A human-readable description of the error.
838 */
839 message?: string;
840 /**
841 * A short error code that summarizes the error.
842 */
843 reason?: string;
844 };
845
846 /**
847 * Evaluation metrics of a model. These are either computed on all training data or just the eval data based on whether eval data was used during training. These are not present for imported models.
848 */
849 type IEvaluationMetrics = {
850 /**
851 * Populated for ARIMA models.
852 */
853 arimaForecastingMetrics?: IArimaForecastingMetrics;
854 /**
855 * Populated for binary classification/classifier models.
856 */
857 binaryClassificationMetrics?: IBinaryClassificationMetrics;
858 /**
859 * Populated for clustering models.
860 */
861 clusteringMetrics?: IClusteringMetrics;
862 /**
863 * Populated for multi-class classification/classifier models.
864 */
865 multiClassClassificationMetrics?: IMultiClassClassificationMetrics;
866 /**
867 * Populated for implicit feedback type matrix factorization models.
868 */
869 rankingMetrics?: IRankingMetrics;
870 /**
871 * Populated for regression models and explicit feedback type matrix factorization models.
872 */
873 regressionMetrics?: IRegressionMetrics;
874 };
875
876 type IExplainQueryStage = {
877 /**
878 * Number of parallel input segments completed.
879 */
880 completedParallelInputs?: string;
881 /**
882 * Milliseconds the average shard spent on CPU-bound tasks.
883 */
884 computeMsAvg?: string;
885 /**
886 * Milliseconds the slowest shard spent on CPU-bound tasks.
887 */
888 computeMsMax?: string;
889 /**
890 * Relative amount of time the average shard spent on CPU-bound tasks.
891 */
892 computeRatioAvg?: number;
893 /**
894 * Relative amount of time the slowest shard spent on CPU-bound tasks.
895 */
896 computeRatioMax?: number;
897 /**
898 * Stage end time represented as milliseconds since epoch.
899 */
900 endMs?: string;
901 /**
902 * Unique ID for stage within plan.
903 */
904 id?: string;
905 /**
906 * IDs for stages that are inputs to this stage.
907 */
908 inputStages?: Array<string>;
909 /**
910 * Human-readable name for stage.
911 */
912 name?: string;
913 /**
914 * Number of parallel input segments to be processed.
915 */
916 parallelInputs?: string;
917 /**
918 * Milliseconds the average shard spent reading input.
919 */
920 readMsAvg?: string;
921 /**
922 * Milliseconds the slowest shard spent reading input.
923 */
924 readMsMax?: string;
925 /**
926 * Relative amount of time the average shard spent reading input.
927 */
928 readRatioAvg?: number;
929 /**
930 * Relative amount of time the slowest shard spent reading input.
931 */
932 readRatioMax?: number;
933 /**
934 * Number of records read into the stage.
935 */
936 recordsRead?: string;
937 /**
938 * Number of records written by the stage.
939 */
940 recordsWritten?: string;
941 /**
942 * Total number of bytes written to shuffle.
943 */
944 shuffleOutputBytes?: string;
945 /**
946 * Total number of bytes written to shuffle and spilled to disk.
947 */
948 shuffleOutputBytesSpilled?: string;
949 /**
950 * Slot-milliseconds used by the stage.
951 */
952 slotMs?: string;
953 /**
954 * Stage start time represented as milliseconds since epoch.
955 */
956 startMs?: string;
957 /**
958 * Current status for the stage.
959 */
960 status?: string;
961 /**
962 * List of operations within the stage in dependency order (approximately chronological).
963 */
964 steps?: Array<IExplainQueryStep>;
965 /**
966 * Milliseconds the average shard spent waiting to be scheduled.
967 */
968 waitMsAvg?: string;
969 /**
970 * Milliseconds the slowest shard spent waiting to be scheduled.
971 */
972 waitMsMax?: string;
973 /**
974 * Relative amount of time the average shard spent waiting to be scheduled.
975 */
976 waitRatioAvg?: number;
977 /**
978 * Relative amount of time the slowest shard spent waiting to be scheduled.
979 */
980 waitRatioMax?: number;
981 /**
982 * Milliseconds the average shard spent on writing output.
983 */
984 writeMsAvg?: string;
985 /**
986 * Milliseconds the slowest shard spent on writing output.
987 */
988 writeMsMax?: string;
989 /**
990 * Relative amount of time the average shard spent on writing output.
991 */
992 writeRatioAvg?: number;
993 /**
994 * Relative amount of time the slowest shard spent on writing output.
995 */
996 writeRatioMax?: number;
997 };
998
999 type IExplainQueryStep = {
1000 /**
1001 * Machine-readable operation type.
1002 */
1003 kind?: string;
1004 /**
1005 * Human-readable stage descriptions.
1006 */
1007 substeps?: Array<string>;
1008 };
1009
1010 /**
1011 * Explanation for a single feature.
1012 */
1013 type IExplanation = {
1014 /**
1015 * Attribution of feature.
1016 */
1017 attribution?: number;
1018 /**
1019 * Full name of the feature. For non-numerical features, will be formatted like .. Overall size of feature name will always be truncated to first 120 characters.
1020 */
1021 featureName?: string;
1022 };
1023
1024 /**
1025 * Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
1026 */
1027 type IExpr = {
1028 /**
1029 * Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
1030 */
1031 description?: string;
1032 /**
1033 * Textual representation of an expression in Common Expression Language syntax.
1034 */
1035 expression?: string;
1036 /**
1037 * Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
1038 */
1039 location?: string;
1040 /**
1041 * Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
1042 */
1043 title?: string;
1044 };
1045
1046 type IExternalDataConfiguration = {
1047 /**
1048 * Try to detect schema and format options automatically. Any option specified explicitly will be honored.
1049 */
1050 autodetect?: boolean;
1051 /**
1052 * [Optional] Additional options if sourceFormat is set to BIGTABLE.
1053 */
1054 bigtableOptions?: IBigtableOptions;
1055 /**
1056 * [Optional] The compression type of the data source. Possible values include GZIP and NONE. The default value is NONE. This setting is ignored for Google Cloud Bigtable, Google Cloud Datastore backups and Avro formats.
1057 */
1058 compression?: string;
1059 /**
1060 * [Optional, Trusted Tester] Connection for external data source.
1061 */
1062 connectionId?: string;
1063 /**
1064 * Additional properties to set if sourceFormat is set to CSV.
1065 */
1066 csvOptions?: ICsvOptions;
1067 /**
1068 * [Optional] Additional options if sourceFormat is set to GOOGLE_SHEETS.
1069 */
1070 googleSheetsOptions?: IGoogleSheetsOptions;
1071 /**
1072 * [Optional, Trusted Tester] Options to configure hive partitioning support.
1073 */
1074 hivePartitioningOptions?: IHivePartitioningOptions;
1075 /**
1076 * [Optional] Indicates if BigQuery should allow extra values that are not represented in the table schema. If true, the extra values are ignored. If false, records with extra columns are treated as bad records, and if there are too many bad records, an invalid error is returned in the job result. The default value is false. The sourceFormat property determines what BigQuery treats as an extra value: CSV: Trailing columns JSON: Named values that don't match any column names Google Cloud Bigtable: This setting is ignored. Google Cloud Datastore backups: This setting is ignored. Avro: This setting is ignored.
1077 */
1078 ignoreUnknownValues?: boolean;
1079 /**
1080 * [Optional] The maximum number of bad records that BigQuery can ignore when reading data. If the number of bad records exceeds this value, an invalid error is returned in the job result. This is only valid for CSV, JSON, and Google Sheets. The default value is 0, which requires that all records are valid. This setting is ignored for Google Cloud Bigtable, Google Cloud Datastore backups and Avro formats.
1081 */
1082 maxBadRecords?: number;
1083 /**
1084 * [Optional] The schema for the data. Schema is required for CSV and JSON formats. Schema is disallowed for Google Cloud Bigtable, Cloud Datastore backups, and Avro formats.
1085 */
1086 schema?: ITableSchema;
1087 /**
1088 * [Required] The data format. For CSV files, specify "CSV". For Google sheets, specify "GOOGLE_SHEETS". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON". For Avro files, specify "AVRO". For Google Cloud Datastore backups, specify "DATASTORE_BACKUP". [Beta] For Google Cloud Bigtable, specify "BIGTABLE".
1089 */
1090 sourceFormat?: string;
1091 /**
1092 * [Required] The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one '*' wildcard character and it must come after the 'bucket' name. Size limits related to load jobs apply to external data sources. For Google Cloud Bigtable URIs: Exactly one URI can be specified and it has be a fully specified and valid HTTPS URL for a Google Cloud Bigtable table. For Google Cloud Datastore backups, exactly one URI can be specified. Also, the '*' wildcard character is not allowed.
1093 */
1094 sourceUris?: Array<string>;
1095 };
1096
1097 /**
1098 * Representative value of a single feature within the cluster.
1099 */
1100 type IFeatureValue = {
1101 /**
1102 * The categorical feature value.
1103 */
1104 categoricalValue?: ICategoricalValue;
1105 /**
1106 * The feature column name.
1107 */
1108 featureColumn?: string;
1109 /**
1110 * The numerical feature value. This is the centroid value for this feature.
1111 */
1112 numericalValue?: number;
1113 };
1114
1115 /**
1116 * Request message for `GetIamPolicy` method.
1117 */
1118 type IGetIamPolicyRequest = {
1119 /**
1120 * OPTIONAL: A `GetPolicyOptions` object for specifying options to `GetIamPolicy`.
1121 */
1122 options?: IGetPolicyOptions;
1123 };
1124
1125 /**
1126 * Encapsulates settings provided to GetIamPolicy.
1127 */
1128 type IGetPolicyOptions = {
1129 /**
1130 * Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1131 */
1132 requestedPolicyVersion?: number;
1133 };
1134
1135 type IGetQueryResultsResponse = {
1136 /**
1137 * Whether the query result was fetched from the query cache.
1138 */
1139 cacheHit?: boolean;
1140 /**
1141 * [Output-only] The first errors or warnings encountered during the running of the job. The final message includes the number of errors that caused the process to stop. Errors here do not necessarily mean that the job has completed or was unsuccessful.
1142 */
1143 errors?: Array<IErrorProto>;
1144 /**
1145 * A hash of this response.
1146 */
1147 etag?: string;
1148 /**
1149 * Whether the query has completed or not. If rows or totalRows are present, this will always be true. If this is false, totalRows will not be available.
1150 */
1151 jobComplete?: boolean;
1152 /**
1153 * Reference to the BigQuery Job that was created to run the query. This field will be present even if the original request timed out, in which case GetQueryResults can be used to read the results once the query has completed. Since this API only returns the first page of results, subsequent pages can be fetched via the same mechanism (GetQueryResults).
1154 */
1155 jobReference?: IJobReference;
1156 /**
1157 * The resource type of the response.
1158 */
1159 kind?: string;
1160 /**
1161 * [Output-only] The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE.
1162 */
1163 numDmlAffectedRows?: string;
1164 /**
1165 * A token used for paging results.
1166 */
1167 pageToken?: string;
1168 /**
1169 * An object with as many results as can be contained within the maximum permitted reply size. To get any additional rows, you can call GetQueryResults and specify the jobReference returned above. Present only when the query completes successfully.
1170 */
1171 rows?: Array<ITableRow>;
1172 /**
1173 * The schema of the results. Present only when the query completes successfully.
1174 */
1175 schema?: ITableSchema;
1176 /**
1177 * The total number of bytes processed for this query.
1178 */
1179 totalBytesProcessed?: string;
1180 /**
1181 * The total number of rows in the complete query result set, which can be more than the number of rows in this single page of results. Present only when the query completes successfully.
1182 */
1183 totalRows?: string;
1184 };
1185
1186 type IGetServiceAccountResponse = {
1187 /**
1188 * The service account email address.
1189 */
1190 email?: string;
1191 /**
1192 * The resource type of the response.
1193 */
1194 kind?: string;
1195 };
1196
1197 /**
1198 * Global explanations containing the top most important features after training.
1199 */
1200 type IGlobalExplanation = {
1201 /**
1202 * Class label for this set of global explanations. Will be empty/null for binary logistic and linear regression models. Sorted alphabetically in descending order.
1203 */
1204 classLabel?: string;
1205 /**
1206 * A list of the top global explanations. Sorted by absolute value of attribution in descending order.
1207 */
1208 explanations?: Array<IExplanation>;
1209 };
1210
1211 type IGoogleSheetsOptions = {
1212 /**
1213 * [Optional] Range of a sheet to query from. Only used when non-empty. Typical format: sheet_name!top_left_cell_id:bottom_right_cell_id For example: sheet1!A1:B20
1214 */
1215 range?: string;
1216 /**
1217 * [Optional] The number of rows at the top of a sheet that BigQuery will skip when reading the data. The default value is 0. This property is useful if you have header rows that should be skipped. When autodetect is on, behavior is the following: * skipLeadingRows unspecified - Autodetect tries to detect headers in the first row. If they are not detected, the row is read as data. Otherwise data is read starting from the second row. * skipLeadingRows is 0 - Instructs autodetect that there are no headers and data should be read starting from the first row. * skipLeadingRows = N > 0 - Autodetect skips N-1 rows and tries to detect headers in row N. If headers are not detected, row N is just skipped. Otherwise row N is used to extract column names for the detected schema.
1218 */
1219 skipLeadingRows?: string;
1220 };
1221
1222 type IHivePartitioningOptions = {
1223 /**
1224 * [Optional] When set, what mode of hive partitioning to use when reading data. The following modes are supported. (1) AUTO: automatically infer partition key name(s) and type(s). (2) STRINGS: automatically infer partition key name(s). All types are interpreted as strings. (3) CUSTOM: partition key schema is encoded in the source URI prefix. Not all storage formats support hive partitioning. Requesting hive partitioning on an unsupported format will lead to an error. Currently supported types include: AVRO, CSV, JSON, ORC and Parquet.
1225 */
1226 mode?: string;
1227 /**
1228 * [Optional] If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified. Note that this field should only be true when creating a permanent external table or querying a temporary external table. Hive-partitioned loads with requirePartitionFilter explicitly set to true will fail.
1229 */
1230 requirePartitionFilter?: boolean;
1231 /**
1232 * [Optional] When hive partition detection is requested, a common prefix for all source uris should be supplied. The prefix must end immediately before the partition key encoding begins. For example, consider files following this data layout. gs://bucket/path_to_table/dt=2019-01-01/country=BR/id=7/file.avro gs://bucket/path_to_table/dt=2018-12-31/country=CA/id=3/file.avro When hive partitioning is requested with either AUTO or STRINGS detection, the common prefix can be either of gs://bucket/path_to_table or gs://bucket/path_to_table/ (trailing slash does not matter).
1233 */
1234 sourceUriPrefix?: string;
1235 };
1236
1237 /**
1238 * Information about a single iteration of the training run.
1239 */
1240 type IIterationResult = {
1241 arimaResult?: IArimaResult;
1242 /**
1243 * Information about top clusters for clustering models.
1244 */
1245 clusterInfos?: Array<IClusterInfo>;
1246 /**
1247 * Time taken to run the iteration in milliseconds.
1248 */
1249 durationMs?: string;
1250 /**
1251 * Loss computed on the eval data at the end of iteration.
1252 */
1253 evalLoss?: number;
1254 /**
1255 * Index of the iteration, 0 based.
1256 */
1257 index?: number;
1258 /**
1259 * Learn rate used for this iteration.
1260 */
1261 learnRate?: number;
1262 /**
1263 * Loss computed on the training data at the end of iteration.
1264 */
1265 trainingLoss?: number;
1266 };
1267
1268 type IJob = {
1269 /**
1270 * [Required] Describes the job configuration.
1271 */
1272 configuration?: IJobConfiguration;
1273 /**
1274 * [Output-only] A hash of this resource.
1275 */
1276 etag?: string;
1277 /**
1278 * [Output-only] Opaque ID field of the job
1279 */
1280 id?: string;
1281 /**
1282 * [Optional] Reference describing the unique-per-user name of the job.
1283 */
1284 jobReference?: IJobReference;
1285 /**
1286 * [Output-only] The type of the resource.
1287 */
1288 kind?: string;
1289 /**
1290 * [Output-only] A URL that can be used to access this resource again.
1291 */
1292 selfLink?: string;
1293 /**
1294 * [Output-only] Information about the job, including starting time and ending time of the job.
1295 */
1296 statistics?: IJobStatistics;
1297 /**
1298 * [Output-only] The status of this job. Examine this value when polling an asynchronous job to see if the job is complete.
1299 */
1300 status?: IJobStatus;
1301 /**
1302 * [Output-only] Email address of the user who ran the job.
1303 */
1304 user_email?: string;
1305 };
1306
1307 type IJobCancelResponse = {
1308 /**
1309 * The final state of the job.
1310 */
1311 job?: IJob;
1312 /**
1313 * The resource type of the response.
1314 */
1315 kind?: string;
1316 };
1317
1318 type IJobConfiguration = {
1319 /**
1320 * [Pick one] Copies a table.
1321 */
1322 copy?: IJobConfigurationTableCopy;
1323 /**
1324 * [Optional] If set, don't actually run this job. A valid query will return a mostly empty response with some processing statistics, while an invalid query will return the same error it would if it wasn't a dry run. Behavior of non-query jobs is undefined.
1325 */
1326 dryRun?: boolean;
1327 /**
1328 * [Pick one] Configures an extract job.
1329 */
1330 extract?: IJobConfigurationExtract;
1331 /**
1332 * [Optional] Job timeout in milliseconds. If this time limit is exceeded, BigQuery may attempt to terminate the job.
1333 */
1334 jobTimeoutMs?: string;
1335 /**
1336 * [Output-only] The type of the job. Can be QUERY, LOAD, EXTRACT, COPY or UNKNOWN.
1337 */
1338 jobType?: string;
1339 /**
1340 * The labels associated with this job. You can use these to organize and group your jobs. Label keys and values can be no longer than 63 characters, can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter and each label in the list must have a different key.
1341 */
1342 labels?: {[key: string]: string};
1343 /**
1344 * [Pick one] Configures a load job.
1345 */
1346 load?: IJobConfigurationLoad;
1347 /**
1348 * [Pick one] Configures a query job.
1349 */
1350 query?: IJobConfigurationQuery;
1351 };
1352
1353 type IJobConfigurationExtract = {
1354 /**
1355 * [Optional] The compression type to use for exported files. Possible values include GZIP, DEFLATE, SNAPPY, and NONE. The default value is NONE. DEFLATE and SNAPPY are only supported for Avro. Not applicable when extracting models.
1356 */
1357 compression?: string;
1358 /**
1359 * [Optional] The exported file format. Possible values include CSV, NEWLINE_DELIMITED_JSON, PARQUET or AVRO for tables and ML_TF_SAVED_MODEL or ML_XGBOOST_BOOSTER for models. The default value for tables is CSV. Tables with nested or repeated fields cannot be exported as CSV. The default value for models is ML_TF_SAVED_MODEL.
1360 */
1361 destinationFormat?: string;
1362 /**
1363 * [Pick one] DEPRECATED: Use destinationUris instead, passing only one URI as necessary. The fully-qualified Google Cloud Storage URI where the extracted table should be written.
1364 */
1365 destinationUri?: string;
1366 /**
1367 * [Pick one] A list of fully-qualified Google Cloud Storage URIs where the extracted table should be written.
1368 */
1369 destinationUris?: Array<string>;
1370 /**
1371 * [Optional] Delimiter to use between fields in the exported data. Default is ','. Not applicable when extracting models.
1372 */
1373 fieldDelimiter?: string;
1374 /**
1375 * [Optional] Whether to print out a header row in the results. Default is true. Not applicable when extracting models.
1376 */
1377 printHeader?: boolean;
1378 /**
1379 * A reference to the model being exported.
1380 */
1381 sourceModel?: IModelReference;
1382 /**
1383 * A reference to the table being exported.
1384 */
1385 sourceTable?: ITableReference;
1386 /**
1387 * [Optional] If destinationFormat is set to "AVRO", this flag indicates whether to enable extracting applicable column types (such as TIMESTAMP) to their corresponding AVRO logical types (timestamp-micros), instead of only using their raw types (avro-long). Not applicable when extracting models.
1388 */
1389 useAvroLogicalTypes?: boolean;
1390 };
1391
1392 type IJobConfigurationLoad = {
1393 /**
1394 * [Optional] Accept rows that are missing trailing optional columns. The missing values are treated as nulls. If false, records with missing trailing columns are treated as bad records, and if there are too many bad records, an invalid error is returned in the job result. The default value is false. Only applicable to CSV, ignored for other formats.
1395 */
1396 allowJaggedRows?: boolean;
1397 /**
1398 * Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false.
1399 */
1400 allowQuotedNewlines?: boolean;
1401 /**
1402 * [Optional] Indicates if we should automatically infer the options and schema for CSV and JSON sources.
1403 */
1404 autodetect?: boolean;
1405 /**
1406 * [Beta] Clustering specification for the destination table. Must be specified with time-based partitioning, data in the table will be first partitioned and subsequently clustered.
1407 */
1408 clustering?: IClustering;
1409 /**
1410 * [Optional] Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result. The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion.
1411 */
1412 createDisposition?: string;
1413 /**
1414 * [Trusted Tester] Defines the list of possible SQL data types to which the source decimal values are converted. This list and the precision and the scale parameters of the decimal field determine the target type. In the order of NUMERIC, BIGNUMERIC, and STRING, a type is picked if it is in the specified list and if it supports the precision and the scale. STRING supports all precision and scale values. If none of the listed types supports the precision and the scale, the type supporting the widest range in the specified list is picked, and if a value exceeds the supported range when reading the data, an error will be thrown. For example: suppose decimal_target_type = ["NUMERIC", "BIGNUMERIC"]. Then if (precision,scale) is: * (38,9) -> NUMERIC; * (39,9) -> BIGNUMERIC (NUMERIC cannot hold 30 integer digits); * (38,10) -> BIGNUMERIC (NUMERIC cannot hold 10 fractional digits); * (76,38) -> BIGNUMERIC; * (77,38) -> BIGNUMERIC (error if value exeeds supported range). For duplicated types in this field, only one will be considered and the rest will be ignored. The order of the types in this field is ignored. For example, ["BIGNUMERIC", "NUMERIC"] is the same as ["NUMERIC", "BIGNUMERIC"] and NUMERIC always takes precedence over BIGNUMERIC.
1415 */
1416 decimalTargetTypes?: Array<string>;
1417 /**
1418 * Custom encryption configuration (e.g., Cloud KMS keys).
1419 */
1420 destinationEncryptionConfiguration?: IEncryptionConfiguration;
1421 /**
1422 * [Required] The destination table to load the data into.
1423 */
1424 destinationTable?: ITableReference;
1425 /**
1426 * [Beta] [Optional] Properties with which to create the destination table if it is new.
1427 */
1428 destinationTableProperties?: IDestinationTableProperties;
1429 /**
1430 * [Optional] The character encoding of the data. The supported values are UTF-8 or ISO-8859-1. The default value is UTF-8. BigQuery decodes the data after the raw, binary data has been split using the values of the quote and fieldDelimiter properties.
1431 */
1432 encoding?: string;
1433 /**
1434 * [Optional] The separator for fields in a CSV file. The separator can be any ISO-8859-1 single-byte character. To use a character in the range 128-255, you must encode the character as UTF8. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. BigQuery also supports the escape sequence "\t" to specify a tab separator. The default value is a comma (',').
1435 */
1436 fieldDelimiter?: string;
1437 /**
1438 * [Optional, Trusted Tester] Options to configure hive partitioning support.
1439 */
1440 hivePartitioningOptions?: IHivePartitioningOptions;
1441 /**
1442 * [Optional] Indicates if BigQuery should allow extra values that are not represented in the table schema. If true, the extra values are ignored. If false, records with extra columns are treated as bad records, and if there are too many bad records, an invalid error is returned in the job result. The default value is false. The sourceFormat property determines what BigQuery treats as an extra value: CSV: Trailing columns JSON: Named values that don't match any column names
1443 */
1444 ignoreUnknownValues?: boolean;
1445 /**
1446 * [Optional] The maximum number of bad records that BigQuery can ignore when running the job. If the number of bad records exceeds this value, an invalid error is returned in the job result. This is only valid for CSV and JSON. The default value is 0, which requires that all records are valid.
1447 */
1448 maxBadRecords?: number;
1449 /**
1450 * [Optional] Specifies a string that represents a null value in a CSV file. For example, if you specify "\N", BigQuery interprets "\N" as a null value when loading a CSV file. The default value is the empty string. If you set this property to a custom value, BigQuery throws an error if an empty string is present for all data types except for STRING and BYTE. For STRING and BYTE columns, BigQuery interprets the empty string as an empty value.
1451 */
1452 nullMarker?: string;
1453 /**
1454 * If sourceFormat is set to "DATASTORE_BACKUP", indicates which entity properties to load into BigQuery from a Cloud Datastore backup. Property names are case sensitive and must be top-level properties. If no properties are specified, BigQuery loads all properties. If any named property isn't found in the Cloud Datastore backup, an invalid error is returned in the job result.
1455 */
1456 projectionFields?: Array<string>;
1457 /**
1458 * [Optional] The value that is used to quote data sections in a CSV file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. The default value is a double-quote ('"'). If your data does not contain quoted sections, set the property value to an empty string. If your data contains quoted newline characters, you must also set the allowQuotedNewlines property to true.
1459 */
1460 quote?: string;
1461 /**
1462 * [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified.
1463 */
1464 rangePartitioning?: IRangePartitioning;
1465 /**
1466 * [Optional] The schema for the destination table. The schema can be omitted if the destination table already exists, or if you're loading data from Google Cloud Datastore.
1467 */
1468 schema?: ITableSchema;
1469 /**
1470 * [Deprecated] The inline schema. For CSV schemas, specify as "Field1:Type1[,Field2:Type2]*". For example, "foo:STRING, bar:INTEGER, baz:FLOAT".
1471 */
1472 schemaInline?: string;
1473 /**
1474 * [Deprecated] The format of the schemaInline property.
1475 */
1476 schemaInlineFormat?: string;
1477 /**
1478 * Allows the schema of the destination table to be updated as a side effect of the load job if a schema is autodetected or supplied in the job configuration. Schema update options are supported in two cases: when writeDisposition is WRITE_APPEND; when writeDisposition is WRITE_TRUNCATE and the destination table is a partition of a table, specified by partition decorators. For normal tables, WRITE_TRUNCATE will always overwrite the schema. One or more of the following values are specified: ALLOW_FIELD_ADDITION: allow adding a nullable field to the schema. ALLOW_FIELD_RELAXATION: allow relaxing a required field in the original schema to nullable.
1479 */
1480 schemaUpdateOptions?: Array<string>;
1481 /**
1482 * [Optional] The number of rows at the top of a CSV file that BigQuery will skip when loading the data. The default value is 0. This property is useful if you have header rows in the file that should be skipped.
1483 */
1484 skipLeadingRows?: number;
1485 /**
1486 * [Optional] The format of the data files. For CSV files, specify "CSV". For datastore backups, specify "DATASTORE_BACKUP". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON". For Avro, specify "AVRO". For parquet, specify "PARQUET". For orc, specify "ORC". The default value is CSV.
1487 */
1488 sourceFormat?: string;
1489 /**
1490 * [Required] The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one '*' wildcard character and it must come after the 'bucket' name. Size limits related to load jobs apply to external data sources. For Google Cloud Bigtable URIs: Exactly one URI can be specified and it has be a fully specified and valid HTTPS URL for a Google Cloud Bigtable table. For Google Cloud Datastore backups: Exactly one URI can be specified. Also, the '*' wildcard character is not allowed.
1491 */
1492 sourceUris?: Array<string>;
1493 /**
1494 * Time-based partitioning specification for the destination table. Only one of timePartitioning and rangePartitioning should be specified.
1495 */
1496 timePartitioning?: ITimePartitioning;
1497 /**
1498 * [Optional] If sourceFormat is set to "AVRO", indicates whether to enable interpreting logical types into their corresponding types (ie. TIMESTAMP), instead of only using their raw types (ie. INTEGER).
1499 */
1500 useAvroLogicalTypes?: boolean;
1501 /**
1502 * [Optional] Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table already exists and contains data, a 'duplicate' error is returned in the job result. The default value is WRITE_APPEND. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion.
1503 */
1504 writeDisposition?: string;
1505 };
1506
1507 type IJobConfigurationQuery = {
1508 /**
1509 * [Optional] If true and query uses legacy SQL dialect, allows the query to produce arbitrarily large result tables at a slight cost in performance. Requires destinationTable to be set. For standard SQL queries, this flag is ignored and large results are always allowed. However, you must still set destinationTable when result size exceeds the allowed maximum response size.
1510 */
1511 allowLargeResults?: boolean;
1512 /**
1513 * [Beta] Clustering specification for the destination table. Must be specified with time-based partitioning, data in the table will be first partitioned and subsequently clustered.
1514 */
1515 clustering?: IClustering;
1516 /**
1517 * Connection properties.
1518 */
1519 connectionProperties?: Array<IConnectionProperty>;
1520 /**
1521 * [Optional] Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result. The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion.
1522 */
1523 createDisposition?: string;
1524 /**
1525 * [Optional] Specifies the default dataset to use for unqualified table names in the query. Note that this does not alter behavior of unqualified dataset names.
1526 */
1527 defaultDataset?: IDatasetReference;
1528 /**
1529 * Custom encryption configuration (e.g., Cloud KMS keys).
1530 */
1531 destinationEncryptionConfiguration?: IEncryptionConfiguration;
1532 /**
1533 * [Optional] Describes the table where the query results should be stored. If not present, a new table will be created to store the results. This property must be set for large results that exceed the maximum response size.
1534 */
1535 destinationTable?: ITableReference;
1536 /**
1537 * [Optional] If true and query uses legacy SQL dialect, flattens all nested and repeated fields in the query results. allowLargeResults must be true if this is set to false. For standard SQL queries, this flag is ignored and results are never flattened.
1538 */
1539 flattenResults?: boolean;
1540 /**
1541 * [Optional] Limits the billing tier for this job. Queries that have resource usage beyond this tier will fail (without incurring a charge). If unspecified, this will be set to your project default.
1542 */
1543 maximumBillingTier?: number;
1544 /**
1545 * [Optional] Limits the bytes billed for this job. Queries that will have bytes billed beyond this limit will fail (without incurring a charge). If unspecified, this will be set to your project default.
1546 */
1547 maximumBytesBilled?: string;
1548 /**
1549 * Standard SQL only. Set to POSITIONAL to use positional (?) query parameters or to NAMED to use named (@myparam) query parameters in this query.
1550 */
1551 parameterMode?: string;
1552 /**
1553 * [Deprecated] This property is deprecated.
1554 */
1555 preserveNulls?: boolean;
1556 /**
1557 * [Optional] Specifies a priority for the query. Possible values include INTERACTIVE and BATCH. The default value is INTERACTIVE.
1558 */
1559 priority?: string;
1560 /**
1561 * [Required] SQL query text to execute. The useLegacySql field can be used to indicate whether the query uses legacy SQL or standard SQL.
1562 */
1563 query?: string;
1564 /**
1565 * Query parameters for standard SQL queries.
1566 */
1567 queryParameters?: Array<IQueryParameter>;
1568 /**
1569 * [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified.
1570 */
1571 rangePartitioning?: IRangePartitioning;
1572 /**
1573 * Allows the schema of the destination table to be updated as a side effect of the query job. Schema update options are supported in two cases: when writeDisposition is WRITE_APPEND; when writeDisposition is WRITE_TRUNCATE and the destination table is a partition of a table, specified by partition decorators. For normal tables, WRITE_TRUNCATE will always overwrite the schema. One or more of the following values are specified: ALLOW_FIELD_ADDITION: allow adding a nullable field to the schema. ALLOW_FIELD_RELAXATION: allow relaxing a required field in the original schema to nullable.
1574 */
1575 schemaUpdateOptions?: Array<string>;
1576 /**
1577 * [Optional] If querying an external data source outside of BigQuery, describes the data format, location and other properties of the data source. By defining these properties, the data source can then be queried as if it were a standard BigQuery table.
1578 */
1579 tableDefinitions?: {[key: string]: IExternalDataConfiguration};
1580 /**
1581 * Time-based partitioning specification for the destination table. Only one of timePartitioning and rangePartitioning should be specified.
1582 */
1583 timePartitioning?: ITimePartitioning;
1584 /**
1585 * Specifies whether to use BigQuery's legacy SQL dialect for this query. The default value is true. If set to false, the query will use BigQuery's standard SQL: https://cloud.google.com/bigquery/sql-reference/ When useLegacySql is set to false, the value of flattenResults is ignored; query will be run as if flattenResults is false.
1586 */
1587 useLegacySql?: boolean;
1588 /**
1589 * [Optional] Whether to look for the result in the query cache. The query cache is a best-effort cache that will be flushed whenever tables in the query are modified. Moreover, the query cache is only available when a query does not have a destination table specified. The default value is true.
1590 */
1591 useQueryCache?: boolean;
1592 /**
1593 * Describes user-defined function resources used in the query.
1594 */
1595 userDefinedFunctionResources?: Array<IUserDefinedFunctionResource>;
1596 /**
1597 * [Optional] Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data and uses the schema from the query result. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table already exists and contains data, a 'duplicate' error is returned in the job result. The default value is WRITE_EMPTY. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion.
1598 */
1599 writeDisposition?: string;
1600 };
1601
1602 type IJobConfigurationTableCopy = {
1603 /**
1604 * [Optional] Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result. The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion.
1605 */
1606 createDisposition?: string;
1607 /**
1608 * Custom encryption configuration (e.g., Cloud KMS keys).
1609 */
1610 destinationEncryptionConfiguration?: IEncryptionConfiguration;
1611 /**
1612 * [Optional] The time when the destination table expires. Expired tables will be deleted and their storage reclaimed.
1613 */
1614 destinationExpirationTime?: any;
1615 /**
1616 * [Required] The destination table
1617 */
1618 destinationTable?: ITableReference;
1619 /**
1620 * [Optional] Supported operation types in table copy job.
1621 */
1622 operationType?: string;
1623 /**
1624 * [Pick one] Source table to copy.
1625 */
1626 sourceTable?: ITableReference;
1627 /**
1628 * [Pick one] Source tables to copy.
1629 */
1630 sourceTables?: Array<ITableReference>;
1631 /**
1632 * [Optional] Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table already exists and contains data, a 'duplicate' error is returned in the job result. The default value is WRITE_EMPTY. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion.
1633 */
1634 writeDisposition?: string;
1635 };
1636
1637 type IJobList = {
1638 /**
1639 * A hash of this page of results.
1640 */
1641 etag?: string;
1642 /**
1643 * List of jobs that were requested.
1644 */
1645 jobs?: Array<{
1646 /**
1647 * [Full-projection-only] Specifies the job configuration.
1648 */
1649 configuration?: IJobConfiguration;
1650 /**
1651 * A result object that will be present only if the job has failed.
1652 */
1653 errorResult?: IErrorProto;
1654 /**
1655 * Unique opaque ID of the job.
1656 */
1657 id?: string;
1658 /**
1659 * Job reference uniquely identifying the job.
1660 */
1661 jobReference?: IJobReference;
1662 /**
1663 * The resource type.
1664 */
1665 kind?: string;
1666 /**
1667 * Running state of the job. When the state is DONE, errorResult can be checked to determine whether the job succeeded or failed.
1668 */
1669 state?: string;
1670 /**
1671 * [Output-only] Information about the job, including starting time and ending time of the job.
1672 */
1673 statistics?: IJobStatistics;
1674 /**
1675 * [Full-projection-only] Describes the state of the job.
1676 */
1677 status?: IJobStatus;
1678 /**
1679 * [Full-projection-only] Email address of the user who ran the job.
1680 */
1681 user_email?: string;
1682 }>;
1683 /**
1684 * The resource type of the response.
1685 */
1686 kind?: string;
1687 /**
1688 * A token to request the next page of results.
1689 */
1690 nextPageToken?: string;
1691 };
1692
1693 type IJobReference = {
1694 /**
1695 * [Required] The ID of the job. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-). The maximum length is 1,024 characters.
1696 */
1697 jobId?: string;
1698 /**
1699 * The geographic location of the job. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location.
1700 */
1701 location?: string;
1702 /**
1703 * [Required] The ID of the project containing this job.
1704 */
1705 projectId?: string;
1706 };
1707
1708 type IJobStatistics = {
1709 /**
1710 * [TrustedTester] [Output-only] Job progress (0.0 -> 1.0) for LOAD and EXTRACT jobs.
1711 */
1712 completionRatio?: number;
1713 /**
1714 * [Output-only] Creation time of this job, in milliseconds since the epoch. This field will be present on all jobs.
1715 */
1716 creationTime?: string;
1717 /**
1718 * [Output-only] End time of this job, in milliseconds since the epoch. This field will be present whenever a job is in the DONE state.
1719 */
1720 endTime?: string;
1721 /**
1722 * [Output-only] Statistics for an extract job.
1723 */
1724 extract?: IJobStatistics4;
1725 /**
1726 * [Output-only] Statistics for a load job.
1727 */
1728 load?: IJobStatistics3;
1729 /**
1730 * [Output-only] Number of child jobs executed.
1731 */
1732 numChildJobs?: string;
1733 /**
1734 * [Output-only] If this is a child job, the id of the parent.
1735 */
1736 parentJobId?: string;
1737 /**
1738 * [Output-only] Statistics for a query job.
1739 */
1740 query?: IJobStatistics2;
1741 /**
1742 * [Output-only] Quotas which delayed this job's start time.
1743 */
1744 quotaDeferments?: Array<string>;
1745 /**
1746 * [Output-only] Job resource usage breakdown by reservation.
1747 */
1748 reservationUsage?: Array<{
1749 /**
1750 * [Output-only] Reservation name or "unreserved" for on-demand resources usage.
1751 */
1752 name?: string;
1753 /**
1754 * [Output-only] Slot-milliseconds the job spent in the given reservation.
1755 */
1756 slotMs?: string;
1757 }>;
1758 /**
1759 * [Output-only] Name of the primary reservation assigned to this job. Note that this could be different than reservations reported in the reservation usage field if parent reservations were used to execute this job.
1760 */
1761 reservation_id?: string;
1762 /**
1763 * [Output-only] [Preview] Statistics for row-level security. Present only for query and extract jobs.
1764 */
1765 rowLevelSecurityStatistics?: IRowLevelSecurityStatistics;
1766 /**
1767 * [Output-only] Statistics for a child job of a script.
1768 */
1769 scriptStatistics?: IScriptStatistics;
1770 /**
1771 * [Output-only] Start time of this job, in milliseconds since the epoch. This field will be present when the job transitions from the PENDING state to either RUNNING or DONE.
1772 */
1773 startTime?: string;
1774 /**
1775 * [Output-only] [Deprecated] Use the bytes processed in the query statistics instead.
1776 */
1777 totalBytesProcessed?: string;
1778 /**
1779 * [Output-only] Slot-milliseconds for the job.
1780 */
1781 totalSlotMs?: string;
1782 /**
1783 * [Output-only] [Alpha] Information of the multi-statement transaction if this job is part of one.
1784 */
1785 transactionInfoTemplate?: ITransactionInfo;
1786 };
1787
1788 type IJobStatistics2 = {
1789 /**
1790 * [Output-only] Billing tier for the job.
1791 */
1792 billingTier?: number;
1793 /**
1794 * [Output-only] Whether the query result was fetched from the query cache.
1795 */
1796 cacheHit?: boolean;
1797 /**
1798 * [Output-only] [Preview] The number of row access policies affected by a DDL statement. Present only for DROP ALL ROW ACCESS POLICIES queries.
1799 */
1800 ddlAffectedRowAccessPolicyCount?: string;
1801 /**
1802 * The DDL operation performed, possibly dependent on the pre-existence of the DDL target. Possible values (new values might be added in the future): "CREATE": The query created the DDL target. "SKIP": No-op. Example cases: the query is CREATE TABLE IF NOT EXISTS while the table already exists, or the query is DROP TABLE IF EXISTS while the table does not exist. "REPLACE": The query replaced the DDL target. Example case: the query is CREATE OR REPLACE TABLE, and the table already exists. "DROP": The query deleted the DDL target.
1803 */
1804 ddlOperationPerformed?: string;
1805 /**
1806 * The DDL target routine. Present only for CREATE/DROP FUNCTION/PROCEDURE queries.
1807 */
1808 ddlTargetRoutine?: IRoutineReference;
1809 /**
1810 * [Output-only] [Preview] The DDL target row access policy. Present only for CREATE/DROP ROW ACCESS POLICY queries.
1811 */
1812 ddlTargetRowAccessPolicy?: IRowAccessPolicyReference;
1813 /**
1814 * [Output-only] The DDL target table. Present only for CREATE/DROP TABLE/VIEW and DROP ALL ROW ACCESS POLICIES queries.
1815 */
1816 ddlTargetTable?: ITableReference;
1817 /**
1818 * [Output-only] The original estimate of bytes processed for the job.
1819 */
1820 estimatedBytesProcessed?: string;
1821 /**
1822 * [Output-only, Beta] Information about create model query job progress.
1823 */
1824 modelTraining?: IBigQueryModelTraining;
1825 /**
1826 * [Output-only, Beta] Deprecated; do not use.
1827 */
1828 modelTrainingCurrentIteration?: number;
1829 /**
1830 * [Output-only, Beta] Deprecated; do not use.
1831 */
1832 modelTrainingExpectedTotalIteration?: string;
1833 /**
1834 * [Output-only] The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE.
1835 */
1836 numDmlAffectedRows?: string;
1837 /**
1838 * [Output-only] Describes execution plan for the query.
1839 */
1840 queryPlan?: Array<IExplainQueryStage>;
1841 /**
1842 * [Output-only] Referenced routines (persistent user-defined functions and stored procedures) for the job.
1843 */
1844 referencedRoutines?: Array<IRoutineReference>;
1845 /**
1846 * [Output-only] Referenced tables for the job. Queries that reference more than 50 tables will not have a complete list.
1847 */
1848 referencedTables?: Array<ITableReference>;
1849 /**
1850 * [Output-only] Job resource usage breakdown by reservation.
1851 */
1852 reservationUsage?: Array<{
1853 /**
1854 * [Output-only] Reservation name or "unreserved" for on-demand resources usage.
1855 */
1856 name?: string;
1857 /**
1858 * [Output-only] Slot-milliseconds the job spent in the given reservation.
1859 */
1860 slotMs?: string;
1861 }>;
1862 /**
1863 * [Output-only] The schema of the results. Present only for successful dry run of non-legacy SQL queries.
1864 */
1865 schema?: ITableSchema;
1866 /**
1867 * The type of query statement, if valid. Possible values (new values might be added in the future): "SELECT": SELECT query. "INSERT": INSERT query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. "UPDATE": UPDATE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. "DELETE": DELETE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. "MERGE": MERGE query; see https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language. "ALTER_TABLE": ALTER TABLE query. "ALTER_VIEW": ALTER VIEW query. "ASSERT": ASSERT condition AS 'description'. "CREATE_FUNCTION": CREATE FUNCTION query. "CREATE_MODEL": CREATE [OR REPLACE] MODEL ... AS SELECT ... . "CREATE_PROCEDURE": CREATE PROCEDURE query. "CREATE_TABLE": CREATE [OR REPLACE] TABLE without AS SELECT. "CREATE_TABLE_AS_SELECT": CREATE [OR REPLACE] TABLE ... AS SELECT ... . "CREATE_VIEW": CREATE [OR REPLACE] VIEW ... AS SELECT ... . "DROP_FUNCTION" : DROP FUNCTION query. "DROP_PROCEDURE": DROP PROCEDURE query. "DROP_TABLE": DROP TABLE query. "DROP_VIEW": DROP VIEW query.
1868 */
1869 statementType?: string;
1870 /**
1871 * [Output-only] [Beta] Describes a timeline of job execution.
1872 */
1873 timeline?: Array<IQueryTimelineSample>;
1874 /**
1875 * [Output-only] Total bytes billed for the job.
1876 */
1877 totalBytesBilled?: string;
1878 /**
1879 * [Output-only] Total bytes processed for the job.
1880 */
1881 totalBytesProcessed?: string;
1882 /**
1883 * [Output-only] For dry-run jobs, totalBytesProcessed is an estimate and this field specifies the accuracy of the estimate. Possible values can be: UNKNOWN: accuracy of the estimate is unknown. PRECISE: estimate is precise. LOWER_BOUND: estimate is lower bound of what the query would cost. UPPER_BOUND: estimate is upper bound of what the query would cost.
1884 */
1885 totalBytesProcessedAccuracy?: string;
1886 /**
1887 * [Output-only] Total number of partitions processed from all partitioned tables referenced in the job.
1888 */
1889 totalPartitionsProcessed?: string;
1890 /**
1891 * [Output-only] Slot-milliseconds for the job.
1892 */
1893 totalSlotMs?: string;
1894 /**
1895 * Standard SQL only: list of undeclared query parameters detected during a dry run validation.
1896 */
1897 undeclaredQueryParameters?: Array<IQueryParameter>;
1898 };
1899
1900 type IJobStatistics3 = {
1901 /**
1902 * [Output-only] The number of bad records encountered. Note that if the job has failed because of more bad records encountered than the maximum allowed in the load job configuration, then this number can be less than the total number of bad records present in the input data.
1903 */
1904 badRecords?: string;
1905 /**
1906 * [Output-only] Number of bytes of source data in a load job.
1907 */
1908 inputFileBytes?: string;
1909 /**
1910 * [Output-only] Number of source files in a load job.
1911 */
1912 inputFiles?: string;
1913 /**
1914 * [Output-only] Size of the loaded data in bytes. Note that while a load job is in the running state, this value may change.
1915 */
1916 outputBytes?: string;
1917 /**
1918 * [Output-only] Number of rows imported in a load job. Note that while an import job is in the running state, this value may change.
1919 */
1920 outputRows?: string;
1921 };
1922
1923 type IJobStatistics4 = {
1924 /**
1925 * [Output-only] Number of files per destination URI or URI pattern specified in the extract configuration. These values will be in the same order as the URIs specified in the 'destinationUris' field.
1926 */
1927 destinationUriFileCounts?: Array<string>;
1928 /**
1929 * [Output-only] Number of user bytes extracted into the result. This is the byte count as computed by BigQuery for billing purposes.
1930 */
1931 inputBytes?: string;
1932 };
1933
1934 type IJobStatus = {
1935 /**
1936 * [Output-only] Final error result of the job. If present, indicates that the job has completed and was unsuccessful.
1937 */
1938 errorResult?: IErrorProto;
1939 /**
1940 * [Output-only] The first errors encountered during the running of the job. The final message includes the number of errors that caused the process to stop. Errors here do not necessarily mean that the job has completed or was unsuccessful.
1941 */
1942 errors?: Array<IErrorProto>;
1943 /**
1944 * [Output-only] Running state of the job.
1945 */
1946 state?: string;
1947 };
1948
1949 /**
1950 * Represents a single JSON object.
1951 */
1952 type IJsonObject = {[key: string]: IJsonValue};
1953
1954 type IJsonValue = any;
1955
1956 type IListModelsResponse = {
1957 /**
1958 * Models in the requested dataset. Only the following fields are populated: model_reference, model_type, creation_time, last_modified_time and labels.
1959 */
1960 models?: Array<IModel>;
1961 /**
1962 * A token to request the next page of results.
1963 */
1964 nextPageToken?: string;
1965 };
1966
1967 type IListRoutinesResponse = {
1968 /**
1969 * A token to request the next page of results.
1970 */
1971 nextPageToken?: string;
1972 /**
1973 * Routines in the requested dataset. Unless read_mask is set in the request, only the following fields are populated: etag, project_id, dataset_id, routine_id, routine_type, creation_time, last_modified_time, and language.
1974 */
1975 routines?: Array<IRoutine>;
1976 };
1977
1978 /**
1979 * Response message for the ListRowAccessPolicies method.
1980 */
1981 type IListRowAccessPoliciesResponse = {
1982 /**
1983 * A token to request the next page of results.
1984 */
1985 nextPageToken?: string;
1986 /**
1987 * Row access policies on the requested table.
1988 */
1989 rowAccessPolicies?: Array<IRowAccessPolicy>;
1990 };
1991
1992 /**
1993 * BigQuery-specific metadata about a location. This will be set on google.cloud.location.Location.metadata in Cloud Location API responses.
1994 */
1995 type ILocationMetadata = {
1996 /**
1997 * The legacy BigQuery location ID, e.g. “EU” for the “europe” location. This is for any API consumers that need the legacy “US” and “EU” locations.
1998 */
1999 legacyLocationId?: string;
2000 };
2001
2002 type IMaterializedViewDefinition = {
2003 /**
2004 * [Optional] [TrustedTester] Enable automatic refresh of the materialized view when the base table is updated. The default value is "true".
2005 */
2006 enableRefresh?: boolean;
2007 /**
2008 * [Output-only] [TrustedTester] The time when this materialized view was last modified, in milliseconds since the epoch.
2009 */
2010 lastRefreshTime?: string;
2011 /**
2012 * [Required] A query whose result is persisted.
2013 */
2014 query?: string;
2015 /**
2016 * [Optional] [TrustedTester] The maximum frequency at which this materialized view will be refreshed. The default value is "1800000" (30 minutes).
2017 */
2018 refreshIntervalMs?: string;
2019 };
2020
2021 type IModel = {
2022 /**
2023 * Output only. The time when this model was created, in millisecs since the epoch.
2024 */
2025 creationTime?: string;
2026 /**
2027 * Optional. A user-friendly description of this model.
2028 */
2029 description?: string;
2030 /**
2031 * Custom encryption configuration (e.g., Cloud KMS keys). This shows the encryption configuration of the model data while stored in BigQuery storage. This field can be used with PatchModel to update encryption key for an already encrypted model.
2032 */
2033 encryptionConfiguration?: IEncryptionConfiguration;
2034 /**
2035 * Output only. A hash of this resource.
2036 */
2037 etag?: string;
2038 /**
2039 * Optional. The time when this model expires, in milliseconds since the epoch. If not present, the model will persist indefinitely. Expired models will be deleted and their storage reclaimed. The defaultTableExpirationMs property of the encapsulating dataset can be used to set a default expirationTime on newly created models.
2040 */
2041 expirationTime?: string;
2042 /**
2043 * Output only. Input feature columns that were used to train this model.
2044 */
2045 featureColumns?: Array<IStandardSqlField>;
2046 /**
2047 * Optional. A descriptive name for this model.
2048 */
2049 friendlyName?: string;
2050 /**
2051 * Output only. Label columns that were used to train this model. The output of the model will have a "predicted_" prefix to these columns.
2052 */
2053 labelColumns?: Array<IStandardSqlField>;
2054 /**
2055 * The labels associated with this model. You can use these to organize and group your models. Label keys and values can be no longer than 63 characters, can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter and each label in the list must have a different key.
2056 */
2057 labels?: {[key: string]: string};
2058 /**
2059 * Output only. The time when this model was last modified, in millisecs since the epoch.
2060 */
2061 lastModifiedTime?: string;
2062 /**
2063 * Output only. The geographic location where the model resides. This value is inherited from the dataset.
2064 */
2065 location?: string;
2066 /**
2067 * Required. Unique identifier for this model.
2068 */
2069 modelReference?: IModelReference;
2070 /**
2071 * Output only. Type of the model resource.
2072 */
2073 modelType?:
2074 | 'MODEL_TYPE_UNSPECIFIED'
2075 | 'LINEAR_REGRESSION'
2076 | 'LOGISTIC_REGRESSION'
2077 | 'KMEANS'
2078 | 'MATRIX_FACTORIZATION'
2079 | 'DNN_CLASSIFIER'
2080 | 'TENSORFLOW'
2081 | 'DNN_REGRESSOR'
2082 | 'BOOSTED_TREE_REGRESSOR'
2083 | 'BOOSTED_TREE_CLASSIFIER'
2084 | 'ARIMA'
2085 | 'AUTOML_REGRESSOR'
2086 | 'AUTOML_CLASSIFIER';
2087 /**
2088 * Output only. Information for all training runs in increasing order of start_time.
2089 */
2090 trainingRuns?: Array<ITrainingRun>;
2091 };
2092
2093 type IModelDefinition = {
2094 /**
2095 * [Output-only, Beta] Model options used for the first training run. These options are immutable for subsequent training runs. Default values are used for any options not specified in the input query.
2096 */
2097 modelOptions?: {
2098 labels?: Array<string>;
2099 lossType?: string;
2100 modelType?: string;
2101 };
2102 /**
2103 * [Output-only, Beta] Information about ml training runs, each training run comprises of multiple iterations and there may be multiple training runs for the model if warm start is used or if a user decides to continue a previously cancelled query.
2104 */
2105 trainingRuns?: Array<IBqmlTrainingRun>;
2106 };
2107
2108 type IModelReference = {
2109 /**
2110 * [Required] The ID of the dataset containing this model.
2111 */
2112 datasetId?: string;
2113 /**
2114 * [Required] The ID of the model. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
2115 */
2116 modelId?: string;
2117 /**
2118 * [Required] The ID of the project containing this model.
2119 */
2120 projectId?: string;
2121 };
2122
2123 /**
2124 * Evaluation metrics for multi-class classification/classifier models.
2125 */
2126 type IMultiClassClassificationMetrics = {
2127 /**
2128 * Aggregate classification metrics.
2129 */
2130 aggregateClassificationMetrics?: IAggregateClassificationMetrics;
2131 /**
2132 * Confusion matrix at different thresholds.
2133 */
2134 confusionMatrixList?: Array<IConfusionMatrix>;
2135 };
2136
2137 /**
2138 * An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
2139 */
2140 type IPolicy = {
2141 /**
2142 * Specifies cloud audit logging configuration for this policy.
2143 */
2144 auditConfigs?: Array<IAuditConfig>;
2145 /**
2146 * Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.
2147 */
2148 bindings?: Array<IBinding>;
2149 /**
2150 * `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
2151 */
2152 etag?: string;
2153 /**
2154 * Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2155 */
2156 version?: number;
2157 };
2158
2159 type IProjectList = {
2160 /**
2161 * A hash of the page of results
2162 */
2163 etag?: string;
2164 /**
2165 * The type of list.
2166 */
2167 kind?: string;
2168 /**
2169 * A token to request the next page of results.
2170 */
2171 nextPageToken?: string;
2172 /**
2173 * Projects to which you have at least READ access.
2174 */
2175 projects?: Array<{
2176 /**
2177 * A descriptive name for this project.
2178 */
2179 friendlyName?: string;
2180 /**
2181 * An opaque ID of this project.
2182 */
2183 id?: string;
2184 /**
2185 * The resource type.
2186 */
2187 kind?: string;
2188 /**
2189 * The numeric ID of this project.
2190 */
2191 numericId?: string;
2192 /**
2193 * A unique reference to this project.
2194 */
2195 projectReference?: IProjectReference;
2196 }>;
2197 /**
2198 * The total number of projects in the list.
2199 */
2200 totalItems?: number;
2201 };
2202
2203 type IProjectReference = {
2204 /**
2205 * [Required] ID of the project. Can be either the numeric ID or the assigned ID of the project.
2206 */
2207 projectId?: string;
2208 };
2209
2210 type IQueryParameter = {
2211 /**
2212 * [Optional] If unset, this is a positional parameter. Otherwise, should be unique within a query.
2213 */
2214 name?: string;
2215 /**
2216 * [Required] The type of this parameter.
2217 */
2218 parameterType?: IQueryParameterType;
2219 /**
2220 * [Required] The value of this parameter.
2221 */
2222 parameterValue?: IQueryParameterValue;
2223 };
2224
2225 type IQueryParameterType = {
2226 /**
2227 * [Optional] The type of the array's elements, if this is an array.
2228 */
2229 arrayType?: IQueryParameterType;
2230 /**
2231 * [Optional] The types of the fields of this struct, in order, if this is a struct.
2232 */
2233 structTypes?: Array<{
2234 /**
2235 * [Optional] Human-oriented description of the field.
2236 */
2237 description?: string;
2238 /**
2239 * [Optional] The name of this field.
2240 */
2241 name?: string;
2242 /**
2243 * [Required] The type of this field.
2244 */
2245 type?: IQueryParameterType;
2246 }>;
2247 /**
2248 * [Required] The top level type of this field.
2249 */
2250 type?: string;
2251 };
2252
2253 type IQueryParameterValue = {
2254 /**
2255 * [Optional] The array values, if this is an array type.
2256 */
2257 arrayValues?: Array<IQueryParameterValue>;
2258 /**
2259 * [Optional] The struct field values, in order of the struct type's declaration.
2260 */
2261 structValues?: {[key: string]: IQueryParameterValue};
2262 /**
2263 * [Optional] The value of this value, if a simple scalar type.
2264 */
2265 value?: string;
2266 };
2267
2268 type IQueryRequest = {
2269 /**
2270 * Connection properties.
2271 */
2272 connectionProperties?: Array<IConnectionProperty>;
2273 /**
2274 * [Optional] Specifies the default datasetId and projectId to assume for any unqualified table names in the query. If not set, all table names in the query string must be qualified in the format 'datasetId.tableId'.
2275 */
2276 defaultDataset?: IDatasetReference;
2277 /**
2278 * [Optional] If set to true, BigQuery doesn't run the job. Instead, if the query is valid, BigQuery returns statistics about the job such as how many bytes would be processed. If the query is invalid, an error returns. The default value is false.
2279 */
2280 dryRun?: boolean;
2281 /**
2282 * The resource type of the request.
2283 */
2284 kind?: string;
2285 /**
2286 * The labels associated with this job. You can use these to organize and group your jobs. Label keys and values can be no longer than 63 characters, can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter and each label in the list must have a different key.
2287 */
2288 labels?: {[key: string]: string};
2289 /**
2290 * The geographic location where the job should run. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location.
2291 */
2292 location?: string;
2293 /**
2294 * [Optional] The maximum number of rows of data to return per page of results. Setting this flag to a small value such as 1000 and then paging through results might improve reliability when the query result set is large. In addition to this limit, responses are also limited to 10 MB. By default, there is no maximum row count, and only the byte limit applies.
2295 */
2296 maxResults?: number;
2297 /**
2298 * [Optional] Limits the bytes billed for this job. Queries that will have bytes billed beyond this limit will fail (without incurring a charge). If unspecified, this will be set to your project default.
2299 */
2300 maximumBytesBilled?: string;
2301 /**
2302 * Standard SQL only. Set to POSITIONAL to use positional (?) query parameters or to NAMED to use named (@myparam) query parameters in this query.
2303 */
2304 parameterMode?: string;
2305 /**
2306 * [Deprecated] This property is deprecated.
2307 */
2308 preserveNulls?: boolean;
2309 /**
2310 * [Required] A query string, following the BigQuery query syntax, of the query to execute. Example: "SELECT count(f1) FROM [myProjectId:myDatasetId.myTableId]".
2311 */
2312 query?: string;
2313 /**
2314 * Query parameters for Standard SQL queries.
2315 */
2316 queryParameters?: Array<IQueryParameter>;
2317 /**
2318 * A unique user provided identifier to ensure idempotent behavior for queries. Note that this is different from the job_id. It has the following properties: 1. It is case-sensitive, limited to up to 36 ASCII characters. A UUID is recommended. 2. Read only queries can ignore this token since they are nullipotent by definition. 3. For the purposes of idempotency ensured by the request_id, a request is considered duplicate of another only if they have the same request_id and are actually duplicates. When determining whether a request is a duplicate of the previous request, all parameters in the request that may affect the behavior are considered. For example, query, connection_properties, query_parameters, use_legacy_sql are parameters that affect the result and are considered when determining whether a request is a duplicate, but properties like timeout_ms don't affect the result and are thus not considered. Dry run query requests are never considered duplicate of another request. 4. When a duplicate mutating query request is detected, it returns: a. the results of the mutation if it completes successfully within the timeout. b. the running operation if it is still in progress at the end of the timeout. 5. Its lifetime is limited to 15 minutes. In other words, if two requests are sent with the same request_id, but more than 15 minutes apart, idempotency is not guaranteed.
2319 */
2320 requestId?: string;
2321 /**
2322 * [Optional] How long to wait for the query to complete, in milliseconds, before the request times out and returns. Note that this is only a timeout for the request, not the query. If the query takes longer to run than the timeout value, the call returns without any results and with the 'jobComplete' flag set to false. You can call GetQueryResults() to wait for the query to complete and read the results. The default value is 10000 milliseconds (10 seconds).
2323 */
2324 timeoutMs?: number;
2325 /**
2326 * Specifies whether to use BigQuery's legacy SQL dialect for this query. The default value is true. If set to false, the query will use BigQuery's standard SQL: https://cloud.google.com/bigquery/sql-reference/ When useLegacySql is set to false, the value of flattenResults is ignored; query will be run as if flattenResults is false.
2327 */
2328 useLegacySql?: boolean;
2329 /**
2330 * [Optional] Whether to look for the result in the query cache. The query cache is a best-effort cache that will be flushed whenever tables in the query are modified. The default value is true.
2331 */
2332 useQueryCache?: boolean;
2333 };
2334
2335 type IQueryResponse = {
2336 /**
2337 * Whether the query result was fetched from the query cache.
2338 */
2339 cacheHit?: boolean;
2340 /**
2341 * [Output-only] The first errors or warnings encountered during the running of the job. The final message includes the number of errors that caused the process to stop. Errors here do not necessarily mean that the job has completed or was unsuccessful.
2342 */
2343 errors?: Array<IErrorProto>;
2344 /**
2345 * Whether the query has completed or not. If rows or totalRows are present, this will always be true. If this is false, totalRows will not be available.
2346 */
2347 jobComplete?: boolean;
2348 /**
2349 * Reference to the Job that was created to run the query. This field will be present even if the original request timed out, in which case GetQueryResults can be used to read the results once the query has completed. Since this API only returns the first page of results, subsequent pages can be fetched via the same mechanism (GetQueryResults).
2350 */
2351 jobReference?: IJobReference;
2352 /**
2353 * The resource type.
2354 */
2355 kind?: string;
2356 /**
2357 * [Output-only] The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE.
2358 */
2359 numDmlAffectedRows?: string;
2360 /**
2361 * A token used for paging results.
2362 */
2363 pageToken?: string;
2364 /**
2365 * An object with as many results as can be contained within the maximum permitted reply size. To get any additional rows, you can call GetQueryResults and specify the jobReference returned above.
2366 */
2367 rows?: Array<ITableRow>;
2368 /**
2369 * The schema of the results. Present only when the query completes successfully.
2370 */
2371 schema?: ITableSchema;
2372 /**
2373 * The total number of bytes processed for this query. If this query was a dry run, this is the number of bytes that would be processed if the query were run.
2374 */
2375 totalBytesProcessed?: string;
2376 /**
2377 * The total number of rows in the complete query result set, which can be more than the number of rows in this single page of results.
2378 */
2379 totalRows?: string;
2380 };
2381
2382 type IQueryTimelineSample = {
2383 /**
2384 * Total number of units currently being processed by workers. This does not correspond directly to slot usage. This is the largest value observed since the last sample.
2385 */
2386 activeUnits?: string;
2387 /**
2388 * Total parallel units of work completed by this query.
2389 */
2390 completedUnits?: string;
2391 /**
2392 * Milliseconds elapsed since the start of query execution.
2393 */
2394 elapsedMs?: string;
2395 /**
2396 * Total parallel units of work remaining for the active stages.
2397 */
2398 pendingUnits?: string;
2399 /**
2400 * Cumulative slot-ms consumed by the query.
2401 */
2402 totalSlotMs?: string;
2403 };
2404
2405 type IRangePartitioning = {
2406 /**
2407 * [TrustedTester] [Required] The table is partitioned by this field. The field must be a top-level NULLABLE/REQUIRED field. The only supported type is INTEGER/INT64.
2408 */
2409 field?: string;
2410 /**
2411 * [TrustedTester] [Required] Defines the ranges for range partitioning.
2412 */
2413 range?: {
2414 /**
2415 * [TrustedTester] [Required] The end of range partitioning, exclusive.
2416 */
2417 end?: string;
2418 /**
2419 * [TrustedTester] [Required] The width of each interval.
2420 */
2421 interval?: string;
2422 /**
2423 * [TrustedTester] [Required] The start of range partitioning, inclusive.
2424 */
2425 start?: string;
2426 };
2427 };
2428
2429 /**
2430 * Evaluation metrics used by weighted-ALS models specified by feedback_type=implicit.
2431 */
2432 type IRankingMetrics = {
2433 /**
2434 * Determines the goodness of a ranking by computing the percentile rank from the predicted confidence and dividing it by the original rank.
2435 */
2436 averageRank?: number;
2437 /**
2438 * Calculates a precision per user for all the items by ranking them and then averages all the precisions across all the users.
2439 */
2440 meanAveragePrecision?: number;
2441 /**
2442 * Similar to the mean squared error computed in regression and explicit recommendation models except instead of computing the rating directly, the output from evaluate is computed against a preference which is 1 or 0 depending on if the rating exists or not.
2443 */
2444 meanSquaredError?: number;
2445 /**
2446 * A metric to determine the goodness of a ranking calculated from the predicted confidence by comparing it to an ideal rank measured by the original ratings.
2447 */
2448 normalizedDiscountedCumulativeGain?: number;
2449 };
2450
2451 /**
2452 * Evaluation metrics for regression and explicit feedback type matrix factorization models.
2453 */
2454 type IRegressionMetrics = {
2455 /**
2456 * Mean absolute error.
2457 */
2458 meanAbsoluteError?: number;
2459 /**
2460 * Mean squared error.
2461 */
2462 meanSquaredError?: number;
2463 /**
2464 * Mean squared log error.
2465 */
2466 meanSquaredLogError?: number;
2467 /**
2468 * Median absolute error.
2469 */
2470 medianAbsoluteError?: number;
2471 /**
2472 * R^2 score.
2473 */
2474 rSquared?: number;
2475 };
2476
2477 /**
2478 * A user-defined function or a stored procedure.
2479 */
2480 type IRoutine = {
2481 /**
2482 * Optional.
2483 */
2484 arguments?: Array<IArgument>;
2485 /**
2486 * Output only. The time when this routine was created, in milliseconds since the epoch.
2487 */
2488 creationTime?: string;
2489 /**
2490 * Required. The body of the routine. For functions, this is the expression in the AS clause. If language=SQL, it is the substring inside (but excluding) the parentheses. For example, for the function created with the following statement: `CREATE FUNCTION JoinLines(x string, y string) as (concat(x, "\n", y))` The definition_body is `concat(x, "\n", y)` (\n is not replaced with linebreak). If language=JAVASCRIPT, it is the evaluated string in the AS clause. For example, for the function created with the following statement: `CREATE FUNCTION f() RETURNS STRING LANGUAGE js AS 'return "\n";\n'` The definition_body is `return "\n";\n` Note that both \n are replaced with linebreaks.
2491 */
2492 definitionBody?: string;
2493 /**
2494 * Optional. [Experimental] The description of the routine if defined.
2495 */
2496 description?: string;
2497 /**
2498 * Optional. [Experimental] The determinism level of the JavaScript UDF if defined.
2499 */
2500 determinismLevel?:
2501 | 'DETERMINISM_LEVEL_UNSPECIFIED'
2502 | 'DETERMINISTIC'
2503 | 'NOT_DETERMINISTIC';
2504 /**
2505 * Output only. A hash of this resource.
2506 */
2507 etag?: string;
2508 /**
2509 * Optional. If language = "JAVASCRIPT", this field stores the path of the imported JAVASCRIPT libraries.
2510 */
2511 importedLibraries?: Array<string>;
2512 /**
2513 * Optional. Defaults to "SQL".
2514 */
2515 language?: 'LANGUAGE_UNSPECIFIED' | 'SQL' | 'JAVASCRIPT';
2516 /**
2517 * Output only. The time when this routine was last modified, in milliseconds since the epoch.
2518 */
2519 lastModifiedTime?: string;
2520 /**
2521 * Optional if language = "SQL"; required otherwise. If absent, the return type is inferred from definition_body at query time in each query that references this routine. If present, then the evaluated result will be cast to the specified returned type at query time. For example, for the functions created with the following statements: * `CREATE FUNCTION Add(x FLOAT64, y FLOAT64) RETURNS FLOAT64 AS (x + y);` * `CREATE FUNCTION Increment(x FLOAT64) AS (Add(x, 1));` * `CREATE FUNCTION Decrement(x FLOAT64) RETURNS FLOAT64 AS (Add(x, -1));` The return_type is `{type_kind: "FLOAT64"}` for `Add` and `Decrement`, and is absent for `Increment` (inferred as FLOAT64 at query time). Suppose the function `Add` is replaced by `CREATE OR REPLACE FUNCTION Add(x INT64, y INT64) AS (x + y);` Then the inferred return type of `Increment` is automatically changed to INT64 at query time, while the return type of `Decrement` remains FLOAT64.
2522 */
2523 returnType?: IStandardSqlDataType;
2524 /**
2525 * Required. Reference describing the ID of this routine.
2526 */
2527 routineReference?: IRoutineReference;
2528 /**
2529 * Required. The type of routine.
2530 */
2531 routineType?: 'ROUTINE_TYPE_UNSPECIFIED' | 'SCALAR_FUNCTION' | 'PROCEDURE';
2532 };
2533
2534 type IRoutineReference = {
2535 /**
2536 * [Required] The ID of the dataset containing this routine.
2537 */
2538 datasetId?: string;
2539 /**
2540 * [Required] The ID of the project containing this routine.
2541 */
2542 projectId?: string;
2543 /**
2544 * [Required] The ID of the routine. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters.
2545 */
2546 routineId?: string;
2547 };
2548
2549 /**
2550 * A single row in the confusion matrix.
2551 */
2552 type IRow = {
2553 /**
2554 * The original label of this row.
2555 */
2556 actualLabel?: string;
2557 /**
2558 * Info describing predicted label distribution.
2559 */
2560 entries?: Array<IEntry>;
2561 };
2562
2563 /**
2564 * Represents access on a subset of rows on the specified table, defined by its filter predicate. Access to the subset of rows is controlled by its IAM policy.
2565 */
2566 type IRowAccessPolicy = {
2567 /**
2568 * Output only. The time when this row access policy was created, in milliseconds since the epoch.
2569 */
2570 creationTime?: string;
2571 /**
2572 * Output only. A hash of this resource.
2573 */
2574 etag?: string;
2575 /**
2576 * Required. A SQL boolean expression that represents the rows defined by this row access policy, similar to the boolean expression in a WHERE clause of a SELECT query on a table. References to other tables, routines, and temporary functions are not supported. Examples: region="EU" date_field = CAST('2019-9-27' as DATE) nullable_field is not NULL numeric_field BETWEEN 1.0 AND 5.0
2577 */
2578 filterPredicate?: string;
2579 /**
2580 * Output only. The time when this row access policy was last modified, in milliseconds since the epoch.
2581 */
2582 lastModifiedTime?: string;
2583 /**
2584 * Required. Reference describing the ID of this row access policy.
2585 */
2586 rowAccessPolicyReference?: IRowAccessPolicyReference;
2587 };
2588
2589 type IRowAccessPolicyReference = {
2590 /**
2591 * [Required] The ID of the dataset containing this row access policy.
2592 */
2593 datasetId?: string;
2594 /**
2595 * [Required] The ID of the row access policy. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters.
2596 */
2597 policyId?: string;
2598 /**
2599 * [Required] The ID of the project containing this row access policy.
2600 */
2601 projectId?: string;
2602 /**
2603 * [Required] The ID of the table containing this row access policy.
2604 */
2605 tableId?: string;
2606 };
2607
2608 type IRowLevelSecurityStatistics = {
2609 /**
2610 * [Output-only] [Preview] Whether any accessed data was protected by row access policies.
2611 */
2612 rowLevelSecurityApplied?: boolean;
2613 };
2614
2615 type IScriptStackFrame = {
2616 /**
2617 * [Output-only] One-based end column.
2618 */
2619 endColumn?: number;
2620 /**
2621 * [Output-only] One-based end line.
2622 */
2623 endLine?: number;
2624 /**
2625 * [Output-only] Name of the active procedure, empty if in a top-level script.
2626 */
2627 procedureId?: string;
2628 /**
2629 * [Output-only] One-based start column.
2630 */
2631 startColumn?: number;
2632 /**
2633 * [Output-only] One-based start line.
2634 */
2635 startLine?: number;
2636 /**
2637 * [Output-only] Text of the current statement/expression.
2638 */
2639 text?: string;
2640 };
2641
2642 type IScriptStatistics = {
2643 /**
2644 * [Output-only] Whether this child job was a statement or expression.
2645 */
2646 evaluationKind?: string;
2647 /**
2648 * Stack trace showing the line/column/procedure name of each frame on the stack at the point where the current evaluation happened. The leaf frame is first, the primary script is last. Never empty.
2649 */
2650 stackFrames?: Array<IScriptStackFrame>;
2651 };
2652
2653 /**
2654 * Request message for `SetIamPolicy` method.
2655 */
2656 type ISetIamPolicyRequest = {
2657 /**
2658 * REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.
2659 */
2660 policy?: IPolicy;
2661 /**
2662 * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: "bindings, etag"`
2663 */
2664 updateMask?: string;
2665 };
2666
2667 type ISnapshotDefinition = {
2668 /**
2669 * [Required] Reference describing the ID of the table that is snapshotted.
2670 */
2671 baseTableReference?: ITableReference;
2672 /**
2673 * [Required] The time at which the base table was snapshot.
2674 */
2675 snapshotTime?: string;
2676 };
2677
2678 /**
2679 * The type of a variable, e.g., a function argument. Examples: INT64: {type_kind="INT64"} ARRAY: {type_kind="ARRAY", array_element_type="STRING"} STRUCT>: {type_kind="STRUCT", struct_type={fields=[ {name="x", type={type_kind="STRING"}}, {name="y", type={type_kind="ARRAY", array_element_type="DATE"}} ]}}
2680 */
2681 type IStandardSqlDataType = {
2682 /**
2683 * The type of the array's elements, if type_kind = "ARRAY".
2684 */
2685 arrayElementType?: IStandardSqlDataType;
2686 /**
2687 * The fields of this struct, in order, if type_kind = "STRUCT".
2688 */
2689 structType?: IStandardSqlStructType;
2690 /**
2691 * Required. The top level type of this field. Can be any standard SQL data type (e.g., "INT64", "DATE", "ARRAY").
2692 */
2693 typeKind?:
2694 | 'TYPE_KIND_UNSPECIFIED'
2695 | 'INT64'
2696 | 'BOOL'
2697 | 'FLOAT64'
2698 | 'STRING'
2699 | 'BYTES'
2700 | 'TIMESTAMP'
2701 | 'DATE'
2702 | 'TIME'
2703 | 'DATETIME'
2704 | 'GEOGRAPHY'
2705 | 'NUMERIC'
2706 | 'BIGNUMERIC'
2707 | 'ARRAY'
2708 | 'STRUCT';
2709 };
2710
2711 /**
2712 * A field or a column.
2713 */
2714 type IStandardSqlField = {
2715 /**
2716 * Optional. The name of this field. Can be absent for struct fields.
2717 */
2718 name?: string;
2719 /**
2720 * Optional. The type of this parameter. Absent if not explicitly specified (e.g., CREATE FUNCTION statement can omit the return type; in this case the output parameter does not have this "type" field).
2721 */
2722 type?: IStandardSqlDataType;
2723 };
2724
2725 type IStandardSqlStructType = {fields?: Array<IStandardSqlField>};
2726
2727 type IStreamingbuffer = {
2728 /**
2729 * [Output-only] A lower-bound estimate of the number of bytes currently in the streaming buffer.
2730 */
2731 estimatedBytes?: string;
2732 /**
2733 * [Output-only] A lower-bound estimate of the number of rows currently in the streaming buffer.
2734 */
2735 estimatedRows?: string;
2736 /**
2737 * [Output-only] Contains the timestamp of the oldest entry in the streaming buffer, in milliseconds since the epoch, if the streaming buffer is available.
2738 */
2739 oldestEntryTime?: string;
2740 };
2741
2742 type ITable = {
2743 /**
2744 * [Beta] Clustering specification for the table. Must be specified with partitioning, data in the table will be first partitioned and subsequently clustered.
2745 */
2746 clustering?: IClustering;
2747 /**
2748 * [Output-only] The time when this table was created, in milliseconds since the epoch.
2749 */
2750 creationTime?: string;
2751 /**
2752 * [Optional] A user-friendly description of this table.
2753 */
2754 description?: string;
2755 /**
2756 * Custom encryption configuration (e.g., Cloud KMS keys).
2757 */
2758 encryptionConfiguration?: IEncryptionConfiguration;
2759 /**
2760 * [Output-only] A hash of the table metadata. Used to ensure there were no concurrent modifications to the resource when attempting an update. Not guaranteed to change when the table contents or the fields numRows, numBytes, numLongTermBytes or lastModifiedTime change.
2761 */
2762 etag?: string;
2763 /**
2764 * [Optional] The time when this table expires, in milliseconds since the epoch. If not present, the table will persist indefinitely. Expired tables will be deleted and their storage reclaimed. The defaultTableExpirationMs property of the encapsulating dataset can be used to set a default expirationTime on newly created tables.
2765 */
2766 expirationTime?: string;
2767 /**
2768 * [Optional] Describes the data format, location, and other properties of a table stored outside of BigQuery. By defining these properties, the data source can then be queried as if it were a standard BigQuery table.
2769 */
2770 externalDataConfiguration?: IExternalDataConfiguration;
2771 /**
2772 * [Optional] A descriptive name for this table.
2773 */
2774 friendlyName?: string;
2775 /**
2776 * [Output-only] An opaque ID uniquely identifying the table.
2777 */
2778 id?: string;
2779 /**
2780 * [Output-only] The type of the resource.
2781 */
2782 kind?: string;
2783 /**
2784 * The labels associated with this table. You can use these to organize and group your tables. Label keys and values can be no longer than 63 characters, can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter and each label in the list must have a different key.
2785 */
2786 labels?: {[key: string]: string};
2787 /**
2788 * [Output-only] The time when this table was last modified, in milliseconds since the epoch.
2789 */
2790 lastModifiedTime?: string;
2791 /**
2792 * [Output-only] The geographic location where the table resides. This value is inherited from the dataset.
2793 */
2794 location?: string;
2795 /**
2796 * [Optional] Materialized view definition.
2797 */
2798 materializedView?: IMaterializedViewDefinition;
2799 /**
2800 * [Output-only, Beta] Present iff this table represents a ML model. Describes the training information for the model, and it is required to run 'PREDICT' queries.
2801 */
2802 model?: IModelDefinition;
2803 /**
2804 * [Output-only] The size of this table in bytes, excluding any data in the streaming buffer.
2805 */
2806 numBytes?: string;
2807 /**
2808 * [Output-only] The number of bytes in the table that are considered "long-term storage".
2809 */
2810 numLongTermBytes?: string;
2811 /**
2812 * [Output-only] [TrustedTester] The physical size of this table in bytes, excluding any data in the streaming buffer. This includes compression and storage used for time travel.
2813 */
2814 numPhysicalBytes?: string;
2815 /**
2816 * [Output-only] The number of rows of data in this table, excluding any data in the streaming buffer.
2817 */
2818 numRows?: string;
2819 /**
2820 * [TrustedTester] Range partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified.
2821 */
2822 rangePartitioning?: IRangePartitioning;
2823 /**
2824 * [Optional] If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified.
2825 */
2826 requirePartitionFilter?: boolean;
2827 /**
2828 * [Optional] Describes the schema of this table.
2829 */
2830 schema?: ITableSchema;
2831 /**
2832 * [Output-only] A URL that can be used to access this resource again.
2833 */
2834 selfLink?: string;
2835 /**
2836 * [Output-only] Snapshot definition.
2837 */
2838 snapshotDefinition?: ISnapshotDefinition;
2839 /**
2840 * [Output-only] Contains information regarding this table's streaming buffer, if one is present. This field will be absent if the table is not being streamed to or if there is no data in the streaming buffer.
2841 */
2842 streamingBuffer?: IStreamingbuffer;
2843 /**
2844 * [Required] Reference describing the ID of this table.
2845 */
2846 tableReference?: ITableReference;
2847 /**
2848 * Time-based partitioning specification for this table. Only one of timePartitioning and rangePartitioning should be specified.
2849 */
2850 timePartitioning?: ITimePartitioning;
2851 /**
2852 * [Output-only] Describes the table type. The following values are supported: TABLE: A normal BigQuery table. VIEW: A virtual table defined by a SQL query. SNAPSHOT: An immutable, read-only table that is a copy of another table. [TrustedTester] MATERIALIZED_VIEW: SQL query whose result is persisted. EXTERNAL: A table that references data stored in an external storage system, such as Google Cloud Storage. The default value is TABLE.
2853 */
2854 type?: string;
2855 /**
2856 * [Optional] The view definition.
2857 */
2858 view?: IViewDefinition;
2859 };
2860
2861 type ITableCell = {v?: any};
2862
2863 type ITableDataInsertAllRequest = {
2864 /**
2865 * [Optional] Accept rows that contain values that do not match the schema. The unknown values are ignored. Default is false, which treats unknown values as errors.
2866 */
2867 ignoreUnknownValues?: boolean;
2868 /**
2869 * The resource type of the response.
2870 */
2871 kind?: string;
2872 /**
2873 * The rows to insert.
2874 */
2875 rows?: Array<{
2876 /**
2877 * [Optional] A unique ID for each row. BigQuery uses this property to detect duplicate insertion requests on a best-effort basis.
2878 */
2879 insertId?: string;
2880 /**
2881 * [Required] A JSON object that contains a row of data. The object's properties and values must match the destination table's schema.
2882 */
2883 json?: IJsonObject;
2884 }>;
2885 /**
2886 * [Optional] Insert all valid rows of a request, even if invalid rows exist. The default value is false, which causes the entire request to fail if any invalid rows exist.
2887 */
2888 skipInvalidRows?: boolean;
2889 /**
2890 * If specified, treats the destination table as a base template, and inserts the rows into an instance table named "{destination}{templateSuffix}". BigQuery will manage creation of the instance table, using the schema of the base template table. See https://cloud.google.com/bigquery/streaming-data-into-bigquery#template-tables for considerations when working with templates tables.
2891 */
2892 templateSuffix?: string;
2893 };
2894
2895 type ITableDataInsertAllResponse = {
2896 /**
2897 * An array of errors for rows that were not inserted.
2898 */
2899 insertErrors?: Array<{
2900 /**
2901 * Error information for the row indicated by the index property.
2902 */
2903 errors?: Array<IErrorProto>;
2904 /**
2905 * The index of the row that error applies to.
2906 */
2907 index?: number;
2908 }>;
2909 /**
2910 * The resource type of the response.
2911 */
2912 kind?: string;
2913 };
2914
2915 type ITableDataList = {
2916 /**
2917 * A hash of this page of results.
2918 */
2919 etag?: string;
2920 /**
2921 * The resource type of the response.
2922 */
2923 kind?: string;
2924 /**
2925 * A token used for paging results. Providing this token instead of the startIndex parameter can help you retrieve stable results when an underlying table is changing.
2926 */
2927 pageToken?: string;
2928 /**
2929 * Rows of results.
2930 */
2931 rows?: Array<ITableRow>;
2932 /**
2933 * The total number of rows in the complete table.
2934 */
2935 totalRows?: string;
2936 };
2937
2938 type ITableFieldSchema = {
2939 /**
2940 * [Optional] The categories attached to this field, used for field-level access control.
2941 */
2942 categories?: {
2943 /**
2944 * A list of category resource names. For example, "projects/1/taxonomies/2/categories/3". At most 5 categories are allowed.
2945 */
2946 names?: Array<string>;
2947 };
2948 /**
2949 * [Optional] The field description. The maximum length is 1,024 characters.
2950 */
2951 description?: string;
2952 /**
2953 * [Optional] Describes the nested schema fields if the type property is set to RECORD.
2954 */
2955 fields?: Array<ITableFieldSchema>;
2956 /**
2957 * [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
2958 */
2959 mode?: string;
2960 /**
2961 * [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters.
2962 */
2963 name?: string;
2964 policyTags?: {
2965 /**
2966 * A list of category resource names. For example, "projects/1/location/eu/taxonomies/2/policyTags/3". At most 1 policy tag is allowed.
2967 */
2968 names?: Array<string>;
2969 };
2970 /**
2971 * [Required] The field data type. Possible values include STRING, BYTES, INTEGER, INT64 (same as INTEGER), FLOAT, FLOAT64 (same as FLOAT), BOOLEAN, BOOL (same as BOOLEAN), TIMESTAMP, DATE, TIME, DATETIME, RECORD (where RECORD indicates that the field contains a nested schema) or STRUCT (same as RECORD).
2972 */
2973 type?: string;
2974 };
2975
2976 type ITableList = {
2977 /**
2978 * A hash of this page of results.
2979 */
2980 etag?: string;
2981 /**
2982 * The type of list.
2983 */
2984 kind?: string;
2985 /**
2986 * A token to request the next page of results.
2987 */
2988 nextPageToken?: string;
2989 /**
2990 * Tables in the requested dataset.
2991 */
2992 tables?: Array<{
2993 /**
2994 * [Beta] Clustering specification for this table, if configured.
2995 */
2996 clustering?: IClustering;
2997 /**
2998 * The time when this table was created, in milliseconds since the epoch.
2999 */
3000 creationTime?: string;
3001 /**
3002 * [Optional] The time when this table expires, in milliseconds since the epoch. If not present, the table will persist indefinitely. Expired tables will be deleted and their storage reclaimed.
3003 */
3004 expirationTime?: string;
3005 /**
3006 * The user-friendly name for this table.
3007 */
3008 friendlyName?: string;
3009 /**
3010 * An opaque ID of the table
3011 */
3012 id?: string;
3013 /**
3014 * The resource type.
3015 */
3016 kind?: string;
3017 /**
3018 * The labels associated with this table. You can use these to organize and group your tables.
3019 */
3020 labels?: {[key: string]: string};
3021 /**
3022 * The range partitioning specification for this table, if configured.
3023 */
3024 rangePartitioning?: IRangePartitioning;
3025 /**
3026 * A reference uniquely identifying the table.
3027 */
3028 tableReference?: ITableReference;
3029 /**
3030 * The time-based partitioning specification for this table, if configured.
3031 */
3032 timePartitioning?: ITimePartitioning;
3033 /**
3034 * The type of table. Possible values are: TABLE, VIEW.
3035 */
3036 type?: string;
3037 /**
3038 * Additional details for a view.
3039 */
3040 view?: {
3041 /**
3042 * True if view is defined in legacy SQL dialect, false if in standard SQL.
3043 */
3044 useLegacySql?: boolean;
3045 };
3046 }>;
3047 /**
3048 * The total number of tables in the dataset.
3049 */
3050 totalItems?: number;
3051 };
3052
3053 type ITableReference = {
3054 /**
3055 * [Required] The ID of the dataset containing this table.
3056 */
3057 datasetId?: string;
3058 /**
3059 * [Required] The ID of the project containing this table.
3060 */
3061 projectId?: string;
3062 /**
3063 * [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
3064 */
3065 tableId?: string;
3066 };
3067
3068 type ITableRow = {
3069 /**
3070 * Represents a single row in the result set, consisting of one or more fields.
3071 */
3072 f?: Array<ITableCell>;
3073 };
3074
3075 type ITableSchema = {
3076 /**
3077 * Describes the fields in a table.
3078 */
3079 fields?: Array<ITableFieldSchema>;
3080 };
3081
3082 /**
3083 * Request message for `TestIamPermissions` method.
3084 */
3085 type ITestIamPermissionsRequest = {
3086 /**
3087 * The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
3088 */
3089 permissions?: Array<string>;
3090 };
3091
3092 /**
3093 * Response message for `TestIamPermissions` method.
3094 */
3095 type ITestIamPermissionsResponse = {
3096 /**
3097 * A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
3098 */
3099 permissions?: Array<string>;
3100 };
3101
3102 type ITimePartitioning = {
3103 /**
3104 * [Optional] Number of milliseconds for which to keep the storage for partitions in the table. The storage in a partition will have an expiration time of its partition time plus this value.
3105 */
3106 expirationMs?: string;
3107 /**
3108 * [Beta] [Optional] If not set, the table is partitioned by pseudo column, referenced via either '_PARTITIONTIME' as TIMESTAMP type, or '_PARTITIONDATE' as DATE type. If field is specified, the table is instead partitioned by this field. The field must be a top-level TIMESTAMP or DATE field. Its mode must be NULLABLE or REQUIRED.
3109 */
3110 field?: string;
3111 requirePartitionFilter?: boolean;
3112 /**
3113 * [Required] The supported types are DAY, HOUR, MONTH, and YEAR, which will generate one partition per day, hour, month, and year, respectively. When the type is not specified, the default behavior is DAY.
3114 */
3115 type?: string;
3116 };
3117
3118 type ITrainingOptions = {
3119 /**
3120 * Whether to enable auto ARIMA or not.
3121 */
3122 autoArima?: boolean;
3123 /**
3124 * The max value of non-seasonal p and q.
3125 */
3126 autoArimaMaxOrder?: string;
3127 /**
3128 * Batch size for dnn models.
3129 */
3130 batchSize?: string;
3131 /**
3132 * The data frequency of a time series.
3133 */
3134 dataFrequency?:
3135 | 'DATA_FREQUENCY_UNSPECIFIED'
3136 | 'AUTO_FREQUENCY'
3137 | 'YEARLY'
3138 | 'QUARTERLY'
3139 | 'MONTHLY'
3140 | 'WEEKLY'
3141 | 'DAILY'
3142 | 'HOURLY';
3143 /**
3144 * The column to split data with. This column won't be used as a feature. 1. When data_split_method is CUSTOM, the corresponding column should be boolean. The rows with true value tag are eval data, and the false are training data. 2. When data_split_method is SEQ, the first DATA_SPLIT_EVAL_FRACTION rows (from smallest to largest) in the corresponding column are used as training data, and the rest are eval data. It respects the order in Orderable data types: https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#data-type-properties
3145 */
3146 dataSplitColumn?: string;
3147 /**
3148 * The fraction of evaluation data over the whole input data. The rest of data will be used as training data. The format should be double. Accurate to two decimal places. Default value is 0.2.
3149 */
3150 dataSplitEvalFraction?: number;
3151 /**
3152 * The data split type for training and evaluation, e.g. RANDOM.
3153 */
3154 dataSplitMethod?:
3155 | 'DATA_SPLIT_METHOD_UNSPECIFIED'
3156 | 'RANDOM'
3157 | 'CUSTOM'
3158 | 'SEQUENTIAL'
3159 | 'NO_SPLIT'
3160 | 'AUTO_SPLIT';
3161 /**
3162 * Distance type for clustering models.
3163 */
3164 distanceType?: 'DISTANCE_TYPE_UNSPECIFIED' | 'EUCLIDEAN' | 'COSINE';
3165 /**
3166 * Dropout probability for dnn models.
3167 */
3168 dropout?: number;
3169 /**
3170 * Whether to stop early when the loss doesn't improve significantly any more (compared to min_relative_progress). Used only for iterative training algorithms.
3171 */
3172 earlyStop?: boolean;
3173 /**
3174 * Feedback type that specifies which algorithm to run for matrix factorization.
3175 */
3176 feedbackType?: 'FEEDBACK_TYPE_UNSPECIFIED' | 'IMPLICIT' | 'EXPLICIT';
3177 /**
3178 * Hidden units for dnn models.
3179 */
3180 hiddenUnits?: Array<string>;
3181 /**
3182 * The geographical region based on which the holidays are considered in time series modeling. If a valid value is specified, then holiday effects modeling is enabled.
3183 */
3184 holidayRegion?:
3185 | 'HOLIDAY_REGION_UNSPECIFIED'
3186 | 'GLOBAL'
3187 | 'NA'
3188 | 'JAPAC'
3189 | 'EMEA'
3190 | 'LAC'
3191 | 'AE'
3192 | 'AR'
3193 | 'AT'
3194 | 'AU'
3195 | 'BE'
3196 | 'BR'
3197 | 'CA'
3198 | 'CH'
3199 | 'CL'
3200 | 'CN'
3201 | 'CO'
3202 | 'CS'
3203 | 'CZ'
3204 | 'DE'
3205 | 'DK'
3206 | 'DZ'
3207 | 'EC'
3208 | 'EE'
3209 | 'EG'
3210 | 'ES'
3211 | 'FI'
3212 | 'FR'
3213 | 'GB'
3214 | 'GR'
3215 | 'HK'
3216 | 'HU'
3217 | 'ID'
3218 | 'IE'
3219 | 'IL'
3220 | 'IN'
3221 | 'IR'
3222 | 'IT'
3223 | 'JP'
3224 | 'KR'
3225 | 'LV'
3226 | 'MA'
3227 | 'MX'
3228 | 'MY'
3229 | 'NG'
3230 | 'NL'
3231 | 'NO'
3232 | 'NZ'
3233 | 'PE'
3234 | 'PH'
3235 | 'PK'
3236 | 'PL'
3237 | 'PT'
3238 | 'RO'
3239 | 'RS'
3240 | 'RU'
3241 | 'SA'
3242 | 'SE'
3243 | 'SG'
3244 | 'SI'
3245 | 'SK'
3246 | 'TH'
3247 | 'TR'
3248 | 'TW'
3249 | 'UA'
3250 | 'US'
3251 | 'VE'
3252 | 'VN'
3253 | 'ZA';
3254 /**
3255 * The number of periods ahead that need to be forecasted.
3256 */
3257 horizon?: string;
3258 /**
3259 * Include drift when fitting an ARIMA model.
3260 */
3261 includeDrift?: boolean;
3262 /**
3263 * Specifies the initial learning rate for the line search learn rate strategy.
3264 */
3265 initialLearnRate?: number;
3266 /**
3267 * Name of input label columns in training data.
3268 */
3269 inputLabelColumns?: Array<string>;
3270 /**
3271 * Item column specified for matrix factorization models.
3272 */
3273 itemColumn?: string;
3274 /**
3275 * The column used to provide the initial centroids for kmeans algorithm when kmeans_initialization_method is CUSTOM.
3276 */
3277 kmeansInitializationColumn?: string;
3278 /**
3279 * The method used to initialize the centroids for kmeans algorithm.
3280 */
3281 kmeansInitializationMethod?:
3282 | 'KMEANS_INITIALIZATION_METHOD_UNSPECIFIED'
3283 | 'RANDOM'
3284 | 'CUSTOM'
3285 | 'KMEANS_PLUS_PLUS';
3286 /**
3287 * L1 regularization coefficient.
3288 */
3289 l1Regularization?: number;
3290 /**
3291 * L2 regularization coefficient.
3292 */
3293 l2Regularization?: number;
3294 /**
3295 * Weights associated with each label class, for rebalancing the training data. Only applicable for classification models.
3296 */
3297 labelClassWeights?: {[key: string]: number};
3298 /**
3299 * Learning rate in training. Used only for iterative training algorithms.
3300 */
3301 learnRate?: number;
3302 /**
3303 * The strategy to determine learn rate for the current iteration.
3304 */
3305 learnRateStrategy?:
3306 | 'LEARN_RATE_STRATEGY_UNSPECIFIED'
3307 | 'LINE_SEARCH'
3308 | 'CONSTANT';
3309 /**
3310 * Type of loss function used during training run.
3311 */
3312 lossType?: 'LOSS_TYPE_UNSPECIFIED' | 'MEAN_SQUARED_LOSS' | 'MEAN_LOG_LOSS';
3313 /**
3314 * The maximum number of iterations in training. Used only for iterative training algorithms.
3315 */
3316 maxIterations?: string;
3317 /**
3318 * Maximum depth of a tree for boosted tree models.
3319 */
3320 maxTreeDepth?: string;
3321 /**
3322 * When early_stop is true, stops training when accuracy improvement is less than 'min_relative_progress'. Used only for iterative training algorithms.
3323 */
3324 minRelativeProgress?: number;
3325 /**
3326 * Minimum split loss for boosted tree models.
3327 */
3328 minSplitLoss?: number;
3329 /**
3330 * [Beta] Google Cloud Storage URI from which the model was imported. Only applicable for imported models.
3331 */
3332 modelUri?: string;
3333 /**
3334 * A specification of the non-seasonal part of the ARIMA model: the three components (p, d, q) are the AR order, the degree of differencing, and the MA order.
3335 */
3336 nonSeasonalOrder?: IArimaOrder;
3337 /**
3338 * Number of clusters for clustering models.
3339 */
3340 numClusters?: string;
3341 /**
3342 * Num factors specified for matrix factorization models.
3343 */
3344 numFactors?: string;
3345 /**
3346 * Optimization strategy for training linear regression models.
3347 */
3348 optimizationStrategy?:
3349 | 'OPTIMIZATION_STRATEGY_UNSPECIFIED'
3350 | 'BATCH_GRADIENT_DESCENT'
3351 | 'NORMAL_EQUATION';
3352 /**
3353 * Whether to preserve the input structs in output feature names. Suppose there is a struct A with field b. When false (default), the output feature name is A_b. When true, the output feature name is A.b.
3354 */
3355 preserveInputStructs?: boolean;
3356 /**
3357 * Subsample fraction of the training data to grow tree to prevent overfitting for boosted tree models.
3358 */
3359 subsample?: number;
3360 /**
3361 * Column to be designated as time series data for ARIMA model.
3362 */
3363 timeSeriesDataColumn?: string;
3364 /**
3365 * The id column that will be used to indicate different time series to forecast in parallel.
3366 */
3367 timeSeriesIdColumn?: string;
3368 /**
3369 * Column to be designated as time series timestamp for ARIMA model.
3370 */
3371 timeSeriesTimestampColumn?: string;
3372 /**
3373 * User column specified for matrix factorization models.
3374 */
3375 userColumn?: string;
3376 /**
3377 * Hyperparameter for matrix factoration when implicit feedback type is specified.
3378 */
3379 walsAlpha?: number;
3380 /**
3381 * Whether to train a model from the last checkpoint.
3382 */
3383 warmStart?: boolean;
3384 };
3385
3386 /**
3387 * Information about a single training query run for the model.
3388 */
3389 type ITrainingRun = {
3390 /**
3391 * Data split result of the training run. Only set when the input data is actually split.
3392 */
3393 dataSplitResult?: IDataSplitResult;
3394 /**
3395 * The evaluation metrics over training/eval data that were computed at the end of training.
3396 */
3397 evaluationMetrics?: IEvaluationMetrics;
3398 /**
3399 * Global explanations for important features of the model. For multi-class models, there is one entry for each label class. For other models, there is only one entry in the list.
3400 */
3401 globalExplanations?: Array<IGlobalExplanation>;
3402 /**
3403 * Output of each iteration run, results.size() <= max_iterations.
3404 */
3405 results?: Array<IIterationResult>;
3406 /**
3407 * The start time of this training run.
3408 */
3409 startTime?: string;
3410 /**
3411 * Options that were used for this training run, includes user specified and default options that were used.
3412 */
3413 trainingOptions?: ITrainingOptions;
3414 };
3415
3416 type ITransactionInfo = {
3417 /**
3418 * [Output-only] // [Alpha] Id of the transaction.
3419 */
3420 transactionId?: string;
3421 };
3422
3423 /**
3424 * This is used for defining User Defined Function (UDF) resources only when using legacy SQL. Users of Standard SQL should leverage either DDL (e.g. CREATE [TEMPORARY] FUNCTION ... ) or the Routines API to define UDF resources. For additional information on migrating, see: https://cloud.google.com/bigquery/docs/reference/standard-sql/migrating-from-legacy-sql#differences_in_user-defined_javascript_functions
3425 */
3426 type IUserDefinedFunctionResource = {
3427 /**
3428 * [Pick one] An inline resource that contains code for a user-defined function (UDF). Providing a inline code resource is equivalent to providing a URI for a file containing the same code.
3429 */
3430 inlineCode?: string;
3431 /**
3432 * [Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path).
3433 */
3434 resourceUri?: string;
3435 };
3436
3437 type IViewDefinition = {
3438 /**
3439 * [Required] A query that BigQuery executes when the view is referenced.
3440 */
3441 query?: string;
3442 /**
3443 * Specifies whether to use BigQuery's legacy SQL for this view. The default value is true. If set to false, the view will use BigQuery's standard SQL: https://cloud.google.com/bigquery/sql-reference/ Queries and views that reference this view must use the same flag value.
3444 */
3445 useLegacySql?: boolean;
3446 /**
3447 * Describes user-defined function resources used in the query.
3448 */
3449 userDefinedFunctionResources?: Array<IUserDefinedFunctionResource>;
3450 };
3451
3452 namespace datasets {
3453 /**
3454 * Deletes the dataset specified by the datasetId value. Before you can delete a dataset, you must delete all its tables, either manually or by specifying deleteContents. Immediately after deletion, you can create another dataset with the same name.
3455 */
3456 type IDeleteParams = {
3457 /**
3458 * If True, delete all the tables in the dataset. If False and the dataset contains tables, the request will fail. Default is False
3459 */
3460 deleteContents?: boolean;
3461 };
3462
3463 /**
3464 * Lists all datasets in the specified project to which you have been granted the READER dataset role.
3465 */
3466 type IListParams = {
3467 /**
3468 * Whether to list all datasets, including hidden ones
3469 */
3470 all?: boolean;
3471 /**
3472 * An expression for filtering the results of the request by label. The syntax is "labels.<name>[:<value>]". Multiple filters can be ANDed together by connecting with a space. Example: "labels.department:receiving labels.active". See Filtering datasets using labels for details.
3473 */
3474 filter?: string;
3475 /**
3476 * The maximum number of results to return
3477 */
3478 maxResults?: number;
3479 /**
3480 * Page token, returned by a previous call, to request the next page of results
3481 */
3482 pageToken?: string;
3483 };
3484 }
3485
3486 namespace jobs {
3487 /**
3488 * Requests that a job be cancelled. This call will return immediately, and the client will need to poll for the job status to see if the cancel completed successfully. Cancelled jobs may still incur costs.
3489 */
3490 type ICancelParams = {
3491 /**
3492 * The geographic location of the job. Required except for US and EU. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location.
3493 */
3494 location?: string;
3495 };
3496
3497 /**
3498 * Returns information about a specific job. Job information is available for a six month period after creation. Requires that you're the person who ran the job, or have the Is Owner project role.
3499 */
3500 type IGetParams = {
3501 /**
3502 * The geographic location of the job. Required except for US and EU. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location.
3503 */
3504 location?: string;
3505 };
3506
3507 /**
3508 * Retrieves the results of a query job.
3509 */
3510 type IGetQueryResultsParams = {
3511 /**
3512 * The geographic location where the job should run. Required except for US and EU. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location.
3513 */
3514 location?: string;
3515 /**
3516 * Maximum number of results to read
3517 */
3518 maxResults?: number;
3519 /**
3520 * Page token, returned by a previous call, to request the next page of results
3521 */
3522 pageToken?: string;
3523 /**
3524 * Zero-based index of the starting row
3525 */
3526 startIndex?: string;
3527 /**
3528 * How long to wait for the query to complete, in milliseconds, before returning. Default is 10 seconds. If the timeout passes before the job completes, the 'jobComplete' field in the response will be false
3529 */
3530 timeoutMs?: number;
3531 };
3532
3533 /**
3534 * Lists all jobs that you started in the specified project. Job information is available for a six month period after creation. The job list is sorted in reverse chronological order, by job creation time. Requires the Can View project role, or the Is Owner project role if you set the allUsers property.
3535 */
3536 type IListParams = {
3537 /**
3538 * Whether to display jobs owned by all users in the project. Default false
3539 */
3540 allUsers?: boolean;
3541 /**
3542 * Max value for job creation time, in milliseconds since the POSIX epoch. If set, only jobs created before or at this timestamp are returned
3543 */
3544 maxCreationTime?: string;
3545 /**
3546 * Maximum number of results to return
3547 */
3548 maxResults?: number;
3549 /**
3550 * Min value for job creation time, in milliseconds since the POSIX epoch. If set, only jobs created after or at this timestamp are returned
3551 */
3552 minCreationTime?: string;
3553 /**
3554 * Page token, returned by a previous call, to request the next page of results
3555 */
3556 pageToken?: string;
3557 /**
3558 * If set, retrieves only jobs whose parent is this job. Otherwise, retrieves only jobs which have no parent
3559 */
3560 parentJobId?: string;
3561 /**
3562 * Restrict information returned to a set of selected fields
3563 */
3564 projection?: 'full' | 'minimal';
3565 /**
3566 * Filter for job state
3567 */
3568 stateFilter?: 'done' | 'pending' | 'running';
3569 };
3570 }
3571
3572 namespace models {
3573 /**
3574 * Lists all models in the specified dataset. Requires the READER dataset role.
3575 */
3576 type IListParams = {
3577 /**
3578 * The maximum number of results to return in a single response page. Leverage the page tokens to iterate through the entire collection.
3579 */
3580 maxResults?: number;
3581 /**
3582 * Page token, returned by a previous call to request the next page of results
3583 */
3584 pageToken?: string;
3585 };
3586 }
3587
3588 namespace projects {
3589 /**
3590 * Lists all projects to which you have been granted any project role.
3591 */
3592 type IListParams = {
3593 /**
3594 * Maximum number of results to return
3595 */
3596 maxResults?: number;
3597 /**
3598 * Page token, returned by a previous call, to request the next page of results
3599 */
3600 pageToken?: string;
3601 };
3602 }
3603
3604 namespace routines {
3605 /**
3606 * Gets the specified routine resource by routine ID.
3607 */
3608 type IGetParams = {
3609 /**
3610 * If set, only the Routine fields in the field mask are returned in the response. If unset, all Routine fields are returned.
3611 */
3612 readMask?: string;
3613 };
3614
3615 /**
3616 * Lists all routines in the specified dataset. Requires the READER dataset role.
3617 */
3618 type IListParams = {
3619 /**
3620 * If set, then only the Routines matching this filter are returned. The current supported form is either "routine_type:" or "routineType:", where is a RoutineType enum. Example: "routineType:SCALAR_FUNCTION".
3621 */
3622 filter?: string;
3623 /**
3624 * The maximum number of results to return in a single response page. Leverage the page tokens to iterate through the entire collection.
3625 */
3626 maxResults?: number;
3627 /**
3628 * Page token, returned by a previous call, to request the next page of results
3629 */
3630 pageToken?: string;
3631 /**
3632 * If set, then only the Routine fields in the field mask, as well as project_id, dataset_id and routine_id, are returned in the response. If unset, then the following Routine fields are returned: etag, project_id, dataset_id, routine_id, routine_type, creation_time, last_modified_time, and language.
3633 */
3634 readMask?: string;
3635 };
3636 }
3637
3638 namespace rowAccessPolicies {
3639 /**
3640 * Lists all row access policies on the specified table.
3641 */
3642 type IListParams = {
3643 /**
3644 * The maximum number of results to return in a single response page. Leverage the page tokens to iterate through the entire collection.
3645 */
3646 pageSize?: number;
3647 /**
3648 * Page token, returned by a previous call, to request the next page of results.
3649 */
3650 pageToken?: string;
3651 };
3652 }
3653
3654 namespace tabledata {
3655 /**
3656 * Retrieves table data from a specified set of rows. Requires the READER dataset role.
3657 */
3658 type IListParams = {
3659 /**
3660 * Maximum number of results to return
3661 */
3662 maxResults?: number;
3663 /**
3664 * Page token, returned by a previous call, identifying the result set
3665 */
3666 pageToken?: string;
3667 /**
3668 * List of fields to return (comma-separated). If unspecified, all fields are returned
3669 */
3670 selectedFields?: string;
3671 /**
3672 * Zero-based index of the starting row to read
3673 */
3674 startIndex?: string;
3675 };
3676 }
3677
3678 namespace tables {
3679 /**
3680 * Gets the specified table resource by table ID. This method does not return the data in the table, it only returns the table resource, which describes the structure of this table.
3681 */
3682 type IGetParams = {
3683 /**
3684 * List of fields to return (comma-separated). If unspecified, all fields are returned
3685 */
3686 selectedFields?: string;
3687 };
3688
3689 /**
3690 * Lists all tables in the specified dataset. Requires the READER dataset role.
3691 */
3692 type IListParams = {
3693 /**
3694 * Maximum number of results to return
3695 */
3696 maxResults?: number;
3697 /**
3698 * Page token, returned by a previous call, to request the next page of results
3699 */
3700 pageToken?: string;
3701 };
3702 }
3703}
3704
3705export default bigquery;