UNPKG

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