UNPKG

282 kBTypeScriptView Raw
1// Copyright 2024 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15/**
16 * Discovery Revision: 20240905
17 */
18
19/**
20 * BigQuery API
21 */
22declare namespace bigquery {
23 /**
24 * 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.
25 */
26 type IAggregateClassificationMetrics = {
27 /**
28 * Accuracy is the fraction of predictions given the correct label. For multiclass this is a micro-averaged metric.
29 */
30 accuracy?: number;
31 /**
32 * The F1 score is an average of recall and precision. For multiclass this is a macro-averaged metric.
33 */
34 f1Score?: number;
35 /**
36 * Logarithmic Loss. For multiclass this is a macro-averaged metric.
37 */
38 logLoss?: number;
39 /**
40 * 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.
41 */
42 precision?: number;
43 /**
44 * Recall is the fraction of actual positive labels that were given a positive prediction. For multiclass this is a macro-averaged metric.
45 */
46 recall?: number;
47 /**
48 * Area Under a ROC Curve. For multiclass this is a macro-averaged metric.
49 */
50 rocAuc?: number;
51 /**
52 * 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.
53 */
54 threshold?: number;
55 };
56
57 /**
58 * Represents privacy policy associated with "aggregation threshold" method.
59 */
60 type IAggregationThresholdPolicy = {
61 /**
62 * Optional. The privacy unit column(s) associated with this policy. For now, only one column per data source object (table, view) is allowed as a privacy unit column. Representing as a repeated field in metadata for extensibility to multiple columns in future. Duplicates and Repeated struct fields are not allowed. For nested fields, use dot notation ("outer.inner")
63 */
64 privacyUnitColumns?: Array<string>;
65 /**
66 * Optional. The threshold for the "aggregation threshold" policy.
67 */
68 threshold?: string;
69 };
70
71 /**
72 * Input/output argument of a function or a stored procedure.
73 */
74 type IArgument = {
75 /**
76 * Optional. Defaults to FIXED_TYPE.
77 */
78 argumentKind?: 'ARGUMENT_KIND_UNSPECIFIED' | 'FIXED_TYPE' | 'ANY_TYPE';
79 /**
80 * Required unless argument_kind = ANY_TYPE.
81 */
82 dataType?: IStandardSqlDataType;
83 /**
84 * Optional. Whether the argument is an aggregate function parameter. Must be Unset for routine types other than AGGREGATE_FUNCTION. For AGGREGATE_FUNCTION, if set to false, it is equivalent to adding "NOT AGGREGATE" clause in DDL; Otherwise, it is equivalent to omitting "NOT AGGREGATE" clause in DDL.
85 */
86 isAggregate?: boolean;
87 /**
88 * Optional. Specifies whether the argument is input or output. Can be set for procedures only.
89 */
90 mode?: 'MODE_UNSPECIFIED' | 'IN' | 'OUT' | 'INOUT';
91 /**
92 * Optional. The name of this argument. Can be absent for function return argument.
93 */
94 name?: string;
95 };
96
97 /**
98 * Arima coefficients.
99 */
100 type IArimaCoefficients = {
101 /**
102 * Auto-regressive coefficients, an array of double.
103 */
104 autoRegressiveCoefficients?: Array<number>;
105 /**
106 * Intercept coefficient, just a double not an array.
107 */
108 interceptCoefficient?: number;
109 /**
110 * Moving-average coefficients, an array of double.
111 */
112 movingAverageCoefficients?: Array<number>;
113 };
114
115 /**
116 * ARIMA model fitting metrics.
117 */
118 type IArimaFittingMetrics = {
119 /**
120 * AIC.
121 */
122 aic?: number;
123 /**
124 * Log-likelihood.
125 */
126 logLikelihood?: number;
127 /**
128 * Variance.
129 */
130 variance?: number;
131 };
132
133 /**
134 * Model evaluation metrics for ARIMA forecasting models.
135 */
136 type IArimaForecastingMetrics = {
137 /**
138 * Arima model fitting metrics.
139 */
140 arimaFittingMetrics?: Array<IArimaFittingMetrics>;
141 /**
142 * Repeated as there can be many metric sets (one for each model) in auto-arima and the large-scale case.
143 */
144 arimaSingleModelForecastingMetrics?: Array<IArimaSingleModelForecastingMetrics>;
145 /**
146 * Whether Arima model fitted with drift or not. It is always false when d is not 1.
147 */
148 hasDrift?: Array<boolean>;
149 /**
150 * Non-seasonal order.
151 */
152 nonSeasonalOrder?: Array<IArimaOrder>;
153 /**
154 * Seasonal periods. Repeated because multiple periods are supported for one time series.
155 */
156 seasonalPeriods?: Array<
157 | 'SEASONAL_PERIOD_TYPE_UNSPECIFIED'
158 | 'NO_SEASONALITY'
159 | 'DAILY'
160 | 'WEEKLY'
161 | 'MONTHLY'
162 | 'QUARTERLY'
163 | 'YEARLY'
164 >;
165 /**
166 * Id to differentiate different time series for the large-scale case.
167 */
168 timeSeriesId?: Array<string>;
169 };
170
171 /**
172 * Arima model information.
173 */
174 type IArimaModelInfo = {
175 /**
176 * Arima coefficients.
177 */
178 arimaCoefficients?: IArimaCoefficients;
179 /**
180 * Arima fitting metrics.
181 */
182 arimaFittingMetrics?: IArimaFittingMetrics;
183 /**
184 * Whether Arima model fitted with drift or not. It is always false when d is not 1.
185 */
186 hasDrift?: boolean;
187 /**
188 * If true, holiday_effect is a part of time series decomposition result.
189 */
190 hasHolidayEffect?: boolean;
191 /**
192 * If true, spikes_and_dips is a part of time series decomposition result.
193 */
194 hasSpikesAndDips?: boolean;
195 /**
196 * If true, step_changes is a part of time series decomposition result.
197 */
198 hasStepChanges?: boolean;
199 /**
200 * Non-seasonal order.
201 */
202 nonSeasonalOrder?: IArimaOrder;
203 /**
204 * Seasonal periods. Repeated because multiple periods are supported for one time series.
205 */
206 seasonalPeriods?: Array<
207 | 'SEASONAL_PERIOD_TYPE_UNSPECIFIED'
208 | 'NO_SEASONALITY'
209 | 'DAILY'
210 | 'WEEKLY'
211 | 'MONTHLY'
212 | 'QUARTERLY'
213 | 'YEARLY'
214 >;
215 /**
216 * 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.
217 */
218 timeSeriesId?: string;
219 /**
220 * 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.
221 */
222 timeSeriesIds?: Array<string>;
223 };
224
225 /**
226 * Arima order, can be used for both non-seasonal and seasonal parts.
227 */
228 type IArimaOrder = {
229 /**
230 * Order of the differencing part.
231 */
232 d?: string;
233 /**
234 * Order of the autoregressive part.
235 */
236 p?: string;
237 /**
238 * Order of the moving-average part.
239 */
240 q?: string;
241 };
242
243 /**
244 * (Auto-)arima fitting result. Wrap everything in ArimaResult for easier refactoring if we want to use model-specific iteration results.
245 */
246 type IArimaResult = {
247 /**
248 * This message is repeated because there are multiple arima models fitted in auto-arima. For non-auto-arima model, its size is one.
249 */
250 arimaModelInfo?: Array<IArimaModelInfo>;
251 /**
252 * Seasonal periods. Repeated because multiple periods are supported for one time series.
253 */
254 seasonalPeriods?: Array<
255 | 'SEASONAL_PERIOD_TYPE_UNSPECIFIED'
256 | 'NO_SEASONALITY'
257 | 'DAILY'
258 | 'WEEKLY'
259 | 'MONTHLY'
260 | 'QUARTERLY'
261 | 'YEARLY'
262 >;
263 };
264
265 /**
266 * Model evaluation metrics for a single ARIMA forecasting model.
267 */
268 type IArimaSingleModelForecastingMetrics = {
269 /**
270 * Arima fitting metrics.
271 */
272 arimaFittingMetrics?: IArimaFittingMetrics;
273 /**
274 * Is arima model fitted with drift or not. It is always false when d is not 1.
275 */
276 hasDrift?: boolean;
277 /**
278 * If true, holiday_effect is a part of time series decomposition result.
279 */
280 hasHolidayEffect?: boolean;
281 /**
282 * If true, spikes_and_dips is a part of time series decomposition result.
283 */
284 hasSpikesAndDips?: boolean;
285 /**
286 * If true, step_changes is a part of time series decomposition result.
287 */
288 hasStepChanges?: boolean;
289 /**
290 * Non-seasonal order.
291 */
292 nonSeasonalOrder?: IArimaOrder;
293 /**
294 * Seasonal periods. Repeated because multiple periods are supported for one time series.
295 */
296 seasonalPeriods?: Array<
297 | 'SEASONAL_PERIOD_TYPE_UNSPECIFIED'
298 | 'NO_SEASONALITY'
299 | 'DAILY'
300 | 'WEEKLY'
301 | 'MONTHLY'
302 | 'QUARTERLY'
303 | 'YEARLY'
304 >;
305 /**
306 * 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.
307 */
308 timeSeriesId?: string;
309 /**
310 * 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.
311 */
312 timeSeriesIds?: Array<string>;
313 };
314
315 /**
316 * 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.
317 */
318 type IAuditConfig = {
319 /**
320 * The configuration for logging of each type of permission.
321 */
322 auditLogConfigs?: Array<IAuditLogConfig>;
323 /**
324 * 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.
325 */
326 service?: string;
327 };
328
329 /**
330 * 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.
331 */
332 type IAuditLogConfig = {
333 /**
334 * Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.
335 */
336 exemptedMembers?: Array<string>;
337 /**
338 * The log type that this config enables.
339 */
340 logType?:
341 | 'LOG_TYPE_UNSPECIFIED'
342 | 'ADMIN_READ'
343 | 'DATA_WRITE'
344 | 'DATA_READ';
345 };
346
347 /**
348 * Options for external data sources.
349 */
350 type IAvroOptions = {
351 /**
352 * 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).
353 */
354 useAvroLogicalTypes?: boolean;
355 };
356
357 /**
358 * Reason why BI Engine didn't accelerate the query (or sub-query).
359 */
360 type IBiEngineReason = {
361 /**
362 * Output only. High-level BI Engine reason for partial or disabled acceleration
363 */
364 code?:
365 | 'CODE_UNSPECIFIED'
366 | 'NO_RESERVATION'
367 | 'INSUFFICIENT_RESERVATION'
368 | 'UNSUPPORTED_SQL_TEXT'
369 | 'INPUT_TOO_LARGE'
370 | 'OTHER_REASON'
371 | 'TABLE_EXCLUDED';
372 /**
373 * Output only. Free form human-readable reason for partial or disabled acceleration.
374 */
375 message?: string;
376 };
377
378 /**
379 * Statistics for a BI Engine specific query. Populated as part of JobStatistics2
380 */
381 type IBiEngineStatistics = {
382 /**
383 * Output only. Specifies which mode of BI Engine acceleration was performed (if any).
384 */
385 accelerationMode?:
386 | 'BI_ENGINE_ACCELERATION_MODE_UNSPECIFIED'
387 | 'BI_ENGINE_DISABLED'
388 | 'PARTIAL_INPUT'
389 | 'FULL_INPUT'
390 | 'FULL_QUERY';
391 /**
392 * Output only. Specifies which mode of BI Engine acceleration was performed (if any).
393 */
394 biEngineMode?:
395 | 'ACCELERATION_MODE_UNSPECIFIED'
396 | 'DISABLED'
397 | 'PARTIAL'
398 | 'FULL';
399 /**
400 * 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.
401 */
402 biEngineReasons?: Array<IBiEngineReason>;
403 };
404
405 /**
406 * Configuration for BigLake managed tables.
407 */
408 type IBigLakeConfiguration = {
409 /**
410 * Required. The connection specifying the credentials to be used to read and write to external storage, such as Cloud Storage. The connection_id can have the form `{project}.{location}.{connection_id}` or `projects/{project}/locations/{location}/connections/{connection_id}".
411 */
412 connectionId?: string;
413 /**
414 * Required. The file format the table data is stored in.
415 */
416 fileFormat?: 'FILE_FORMAT_UNSPECIFIED' | 'PARQUET';
417 /**
418 * Required. The fully qualified location prefix of the external folder where table data is stored. The '*' wildcard character is not allowed. The URI should be in the format `gs://bucket/path_to_table/`
419 */
420 storageUri?: string;
421 /**
422 * Required. The table format the metadata only snapshots are stored in.
423 */
424 tableFormat?: 'TABLE_FORMAT_UNSPECIFIED' | 'ICEBERG';
425 };
426
427 type IBigQueryModelTraining = {
428 /**
429 * Deprecated.
430 */
431 currentIteration?: number;
432 /**
433 * Deprecated.
434 */
435 expectedTotalIterations?: string;
436 };
437
438 /**
439 * Information related to a Bigtable column.
440 */
441 type IBigtableColumn = {
442 /**
443 * 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.
444 */
445 encoding?: string;
446 /**
447 * Optional. If the qualifier is not a valid BigQuery field identifier i.e. does not match a-zA-Z*, a valid identifier must be provided as the column field name and is used as field name in queries.
448 */
449 fieldName?: string;
450 /**
451 * 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.
452 */
453 onlyReadLatest?: boolean;
454 /**
455 * [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 valid identifier must be provided as field_name.
456 */
457 qualifierEncoded?: string;
458 /**
459 * Qualifier string.
460 */
461 qualifierString?: string;
462 /**
463 * 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 * JSON 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.
464 */
465 type?: string;
466 };
467
468 /**
469 * Information related to a Bigtable column family.
470 */
471 type IBigtableColumnFamily = {
472 /**
473 * 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 the `.Column` field.
474 */
475 columns?: Array<IBigtableColumn>;
476 /**
477 * 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.
478 */
479 encoding?: string;
480 /**
481 * Identifier of the column family.
482 */
483 familyId?: string;
484 /**
485 * 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.
486 */
487 onlyReadLatest?: boolean;
488 /**
489 * 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 * JSON Default type is BYTES. This can be overridden for a specific column by listing that column in 'columns' and specifying a type for it.
490 */
491 type?: string;
492 };
493
494 /**
495 * Options specific to Google Cloud Bigtable data sources.
496 */
497 type IBigtableOptions = {
498 /**
499 * 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.
500 */
501 columnFamilies?: Array<IBigtableColumnFamily>;
502 /**
503 * 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.
504 */
505 ignoreUnspecifiedColumnFamilies?: boolean;
506 /**
507 * Optional. If field is true, then each column family will be read as a single JSON column. Otherwise they are read as a repeated cell structure containing timestamp/value tuples. The default value is false.
508 */
509 outputColumnFamiliesAsJson?: boolean;
510 /**
511 * 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.
512 */
513 readRowkeyAsString?: boolean;
514 };
515
516 /**
517 * Evaluation metrics for binary classification/classifier models.
518 */
519 type IBinaryClassificationMetrics = {
520 /**
521 * Aggregate classification metrics.
522 */
523 aggregateClassificationMetrics?: IAggregateClassificationMetrics;
524 /**
525 * Binary confusion matrix at multiple thresholds.
526 */
527 binaryConfusionMatrixList?: Array<IBinaryConfusionMatrix>;
528 /**
529 * Label representing the negative class.
530 */
531 negativeLabel?: string;
532 /**
533 * Label representing the positive class.
534 */
535 positiveLabel?: string;
536 };
537
538 /**
539 * Confusion matrix for binary classification models.
540 */
541 type IBinaryConfusionMatrix = {
542 /**
543 * The fraction of predictions given the correct label.
544 */
545 accuracy?: number;
546 /**
547 * The equally weighted average of recall and precision.
548 */
549 f1Score?: number;
550 /**
551 * Number of false samples predicted as false.
552 */
553 falseNegatives?: string;
554 /**
555 * Number of false samples predicted as true.
556 */
557 falsePositives?: string;
558 /**
559 * Threshold value used when computing each of the following metric.
560 */
561 positiveClassThreshold?: number;
562 /**
563 * The fraction of actual positive predictions that had positive actual labels.
564 */
565 precision?: number;
566 /**
567 * The fraction of actual positive labels that were given a positive prediction.
568 */
569 recall?: number;
570 /**
571 * Number of true samples predicted as false.
572 */
573 trueNegatives?: string;
574 /**
575 * Number of true samples predicted as true.
576 */
577 truePositives?: string;
578 };
579
580 /**
581 * Associates `members`, or principals, with a `role`.
582 */
583 type IBinding = {
584 /**
585 * 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).
586 */
587 condition?: IExpr;
588 /**
589 * Specifies the principals requesting access for a Google Cloud 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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `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. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.
590 */
591 members?: Array<string>;
592 /**
593 * Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).
594 */
595 role?: string;
596 };
597
598 type IBqmlIterationResult = {
599 /**
600 * Deprecated.
601 */
602 durationMs?: string;
603 /**
604 * Deprecated.
605 */
606 evalLoss?: number;
607 /**
608 * Deprecated.
609 */
610 index?: number;
611 /**
612 * Deprecated.
613 */
614 learnRate?: number;
615 /**
616 * Deprecated.
617 */
618 trainingLoss?: number;
619 };
620
621 type IBqmlTrainingRun = {
622 /**
623 * Deprecated.
624 */
625 iterationResults?: Array<IBqmlIterationResult>;
626 /**
627 * Deprecated.
628 */
629 startTime?: string;
630 /**
631 * Deprecated.
632 */
633 state?: string;
634 /**
635 * Deprecated.
636 */
637 trainingOptions?: {
638 earlyStop?: boolean;
639 l1Reg?: number;
640 l2Reg?: number;
641 learnRate?: number;
642 learnRateStrategy?: string;
643 lineSearchInitLearnRate?: number;
644 maxIteration?: string;
645 minRelProgress?: number;
646 warmStart?: boolean;
647 };
648 };
649
650 /**
651 * Representative value of a categorical feature.
652 */
653 type ICategoricalValue = {
654 /**
655 * 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.
656 */
657 categoryCounts?: Array<ICategoryCount>;
658 };
659
660 /**
661 * Represents the count of a single category within the cluster.
662 */
663 type ICategoryCount = {
664 /**
665 * The name of category.
666 */
667 category?: string;
668 /**
669 * The count of training samples matching the category within the cluster.
670 */
671 count?: string;
672 };
673
674 /**
675 * Information about base table and clone time of a table clone.
676 */
677 type ICloneDefinition = {
678 /**
679 * Required. Reference describing the ID of the table that was cloned.
680 */
681 baseTableReference?: ITableReference;
682 /**
683 * Required. The time at which the base table was cloned. This value is reported in the JSON response using RFC3339 format.
684 */
685 cloneTime?: string;
686 };
687
688 /**
689 * Message containing the information about one cluster.
690 */
691 type ICluster = {
692 /**
693 * Centroid id.
694 */
695 centroidId?: string;
696 /**
697 * Count of training data rows that were assigned to this cluster.
698 */
699 count?: string;
700 /**
701 * Values of highly variant features for this cluster.
702 */
703 featureValues?: Array<IFeatureValue>;
704 };
705
706 /**
707 * Information about a single cluster for clustering model.
708 */
709 type IClusterInfo = {
710 /**
711 * Centroid id.
712 */
713 centroidId?: string;
714 /**
715 * Cluster radius, the average distance from centroid to each point assigned to the cluster.
716 */
717 clusterRadius?: number;
718 /**
719 * Cluster size, the total number of points assigned to the cluster.
720 */
721 clusterSize?: string;
722 };
723
724 /**
725 * Configures table clustering.
726 */
727 type IClustering = {
728 /**
729 * One or more fields on which data should be clustered. Only top-level, non-repeated, simple-type fields are supported. The ordering of the clustering fields should be prioritized from most to least important for filtering purposes. Additional information on limitations can be found here: https://cloud.google.com/bigquery/docs/creating-clustered-tables#limitations
730 */
731 fields?: Array<string>;
732 };
733
734 /**
735 * Evaluation metrics for clustering models.
736 */
737 type IClusteringMetrics = {
738 /**
739 * Information for all clusters.
740 */
741 clusters?: Array<ICluster>;
742 /**
743 * Davies-Bouldin index.
744 */
745 daviesBouldinIndex?: number;
746 /**
747 * Mean of squared distances between each sample to its cluster centroid.
748 */
749 meanSquaredDistance?: number;
750 };
751
752 /**
753 * Confusion matrix for multi-class classification models.
754 */
755 type IConfusionMatrix = {
756 /**
757 * Confidence threshold used when computing the entries of the confusion matrix.
758 */
759 confidenceThreshold?: number;
760 /**
761 * One row per actual label.
762 */
763 rows?: Array<IRow>;
764 };
765
766 /**
767 * A connection-level property to customize query behavior. Under JDBC, these correspond directly to connection properties passed to the DriverManager. Under ODBC, these correspond to properties in the connection string. Currently supported connection properties: * **dataset_project_id**: represents the default project for datasets that are used in the query. Setting the system variable `@@dataset_project_id` achieves the same behavior. For more information about system variables, see: https://cloud.google.com/bigquery/docs/reference/system-variables * **time_zone**: represents the default timezone used to run the query. * **session_id**: associates the query with a given session. * **query_label**: associates the query with a given job label. If set, all subsequent queries in a script or session will have this label. For the format in which a you can specify a query label, see labels in the JobConfiguration resource type: https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#jobconfiguration * **service_account**: indicates the service account to use to run a continuous query. If set, the query job uses the service account to access Google Cloud resources. Service account access is bounded by the IAM permissions that you have granted to the service account. Additional properties are allowed, but ignored. Specifying multiple connection properties with the same key returns an error.
768 */
769 type IConnectionProperty = {
770 /**
771 * The key of the property to set.
772 */
773 key?: string;
774 /**
775 * The value of the property to set.
776 */
777 value?: string;
778 };
779
780 /**
781 * Information related to a CSV data source.
782 */
783 type ICsvOptions = {
784 /**
785 * 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.
786 */
787 allowJaggedRows?: boolean;
788 /**
789 * Optional. Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false.
790 */
791 allowQuotedNewlines?: boolean;
792 /**
793 * Optional. The character encoding of the data. The supported values are UTF-8, ISO-8859-1, UTF-16BE, UTF-16LE, UTF-32BE, and UTF-32LE. 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.
794 */
795 encoding?: string;
796 /**
797 * Optional. The separator character for fields in a CSV file. The separator is interpreted as a single byte. For files encoded in ISO-8859-1, any single character can be used as a separator. For files encoded in UTF-8, characters represented in decimal range 1-127 (U+0001-U+007F) can be used without any modification. UTF-8 characters encoded with multiple bytes (i.e. U+0080 and above) will have only the first byte used for separating fields. The remaining bytes will be treated as a part of the field. BigQuery also supports the escape sequence "\t" (U+0009) to specify a tab separator. The default value is comma (",", U+002C).
798 */
799 fieldDelimiter?: string;
800 /**
801 * 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 querying 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.
802 */
803 nullMarker?: string;
804 /**
805 * Optional. Indicates if the embedded ASCII control characters (the first 32 characters in the ASCII-table, from '\x00' to '\x1F') are preserved.
806 */
807 preserveAsciiControlCharacters?: boolean;
808 /**
809 * 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. To include the specific quote character within a quoted value, precede it with an additional matching quote character. For example, if you want to escape the default character ' " ', use ' "" '.
810 */
811 quote?: string;
812 /**
813 * 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.
814 */
815 skipLeadingRows?: string;
816 };
817
818 /**
819 * Options for data format adjustments.
820 */
821 type IDataFormatOptions = {
822 /**
823 * Optional. Output timestamp as usec int64. Default is false.
824 */
825 useInt64Timestamp?: boolean;
826 };
827
828 /**
829 * Statistics for data-masking.
830 */
831 type IDataMaskingStatistics = {
832 /**
833 * Whether any accessed data was protected by the data masking.
834 */
835 dataMaskingApplied?: boolean;
836 };
837
838 /**
839 * Data policy option proto, it currently supports name only, will support precedence later.
840 */
841 type IDataPolicyOption = {
842 /**
843 * Data policy resource name in the form of projects/project_id/locations/location_id/dataPolicies/data_policy_id.
844 */
845 name?: string;
846 };
847
848 /**
849 * Data split result. This contains references to the training and evaluation data tables that were used to train the model.
850 */
851 type IDataSplitResult = {
852 /**
853 * Table reference of the evaluation data after split.
854 */
855 evaluationTable?: ITableReference;
856 /**
857 * Table reference of the test data after split.
858 */
859 testTable?: ITableReference;
860 /**
861 * Table reference of the training data after split.
862 */
863 trainingTable?: ITableReference;
864 };
865
866 /**
867 * Represents a BigQuery dataset.
868 */
869 type IDataset = {
870 /**
871 * 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; If you patch a dataset, then this field is overwritten by the patched dataset's access field. To add entities, you must supply the entire existing access array in addition to any new entities that you want to add.
872 */
873 access?: Array<{
874 /**
875 * [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.
876 */
877 dataset?: IDatasetAccessEntry;
878 /**
879 * [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".
880 */
881 domain?: string;
882 /**
883 * [Pick one] An email address of a Google Group to grant access to. Maps to IAM policy member "group:GROUP".
884 */
885 groupByEmail?: string;
886 /**
887 * [Pick one] Some other type of member that appears in the IAM Policy but isn't a user, group, domain, or special group.
888 */
889 iamMember?: string;
890 /**
891 * 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".
892 */
893 role?: string;
894 /**
895 * [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.
896 */
897 routine?: IRoutineReference;
898 /**
899 * [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.
900 */
901 specialGroup?: string;
902 /**
903 * [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".
904 */
905 userByEmail?: string;
906 /**
907 * [Pick one] A view from a different dataset to grant access to. Queries executed against that view will have read access to views/tables/routines 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.
908 */
909 view?: ITableReference;
910 }>;
911 /**
912 * Output only. The time when this dataset was created, in milliseconds since the epoch.
913 */
914 creationTime?: string;
915 /**
916 * Required. A reference that identifies the dataset.
917 */
918 datasetReference?: IDatasetReference;
919 /**
920 * Optional. Defines the default collation specification of future tables created in the dataset. If a table is created in this dataset without table-level default collation, then the table inherits the dataset default collation, which is applied to the string fields that do not have explicit collation specified. A change to this field affects only tables created afterwards, and does not alter the existing tables. The following values are supported: * 'und:ci': undetermined locale, case insensitive. * '': empty string. Default to case-sensitive behavior.
921 */
922 defaultCollation?: string;
923 /**
924 * The default encryption key for all tables in the dataset. After this property is set, the encryption key of all newly-created tables in the dataset is set to this value unless the table creation request or query explicitly overrides the key.
925 */
926 defaultEncryptionConfiguration?: IEncryptionConfiguration;
927 /**
928 * This default partition expiration, expressed in milliseconds. When new time-partitioned tables are created in a dataset where this property is set, the table will inherit this value, propagated as the `TimePartitioning.expirationMs` property on the new table. If you set `TimePartitioning.expirationMs` explicitly when creating a table, the `defaultPartitionExpirationMs` of the containing dataset is ignored. When creating a partitioned table, if `defaultPartitionExpirationMs` is set, the `defaultTableExpirationMs` value is ignored and the table will not be inherit a table expiration deadline.
929 */
930 defaultPartitionExpirationMs?: string;
931 /**
932 * Optional. Defines the default rounding mode specification of new tables created within this dataset. During table creation, if this field is specified, the table within this dataset will inherit the default rounding mode of the dataset. Setting the default rounding mode on a table overrides this option. Existing tables in the dataset are unaffected. If columns are defined during that table creation, they will immediately inherit the table's default rounding mode, unless otherwise specified.
933 */
934 defaultRoundingMode?:
935 | 'ROUNDING_MODE_UNSPECIFIED'
936 | 'ROUND_HALF_AWAY_FROM_ZERO'
937 | 'ROUND_HALF_EVEN';
938 /**
939 * Optional. The default lifetime of all tables in the dataset, in milliseconds. The minimum lifetime value is 3600000 milliseconds (one hour). To clear an existing default expiration with a PATCH request, set to 0. 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.
940 */
941 defaultTableExpirationMs?: string;
942 /**
943 * Optional. A user-friendly description of the dataset.
944 */
945 description?: string;
946 /**
947 * Output only. A hash of the resource.
948 */
949 etag?: string;
950 /**
951 * Optional. Options defining open source compatible datasets living in the BigQuery catalog. Contains metadata of open source database, schema or namespace represented by the current dataset.
952 */
953 externalCatalogDatasetOptions?: IExternalCatalogDatasetOptions;
954 /**
955 * Optional. Reference to a read-only external dataset defined in data catalogs outside of BigQuery. Filled out when the dataset type is EXTERNAL.
956 */
957 externalDatasetReference?: IExternalDatasetReference;
958 /**
959 * Optional. A descriptive name for the dataset.
960 */
961 friendlyName?: string;
962 /**
963 * 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.
964 */
965 id?: string;
966 /**
967 * Optional. TRUE if the dataset and its table names are case-insensitive, otherwise FALSE. By default, this is FALSE, which means the dataset and its table names are case-sensitive. This field does not affect routine references.
968 */
969 isCaseInsensitive?: boolean;
970 /**
971 * Output only. The resource type.
972 */
973 kind?: string;
974 /**
975 * 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](https://cloud.google.com/bigquery/docs/creating-managing-labels#creating_and_updating_dataset_labels) for more information.
976 */
977 labels?: {[key: string]: string};
978 /**
979 * Output only. The date when this dataset was last modified, in milliseconds since the epoch.
980 */
981 lastModifiedTime?: string;
982 /**
983 * Output only. Metadata about the LinkedDataset. Filled out when the dataset type is LINKED.
984 */
985 linkedDatasetMetadata?: ILinkedDatasetMetadata;
986 /**
987 * Optional. The source dataset reference when the dataset is of type LINKED. For all other dataset types it is not set. This field cannot be updated once it is set. Any attempt to update this field using Update and Patch API Operations will be ignored.
988 */
989 linkedDatasetSource?: ILinkedDatasetSource;
990 /**
991 * The geographic location where the dataset should reside. See https://cloud.google.com/bigquery/docs/locations for supported locations.
992 */
993 location?: string;
994 /**
995 * Optional. Defines the time travel window in hours. The value can be from 48 to 168 hours (2 to 7 days). The default value is 168 hours if this is not set.
996 */
997 maxTimeTravelHours?: string;
998 /**
999 * Optional. The [tags](https://cloud.google.com/bigquery/docs/tags) attached to this dataset. Tag keys are globally unique. Tag key is expected to be in the namespaced format, for example "123456789012/environment" where 123456789012 is the ID of the parent organization or project resource for this tag key. Tag value is expected to be the short name, for example "Production". See [Tag definitions](https://cloud.google.com/iam/docs/tags-access-control#definitions) for more details.
1000 */
1001 resourceTags?: {[key: string]: string};
1002 /**
1003 * Optional. Output only. Restriction config for all tables and dataset. If set, restrict certain accesses on the dataset and all its tables based on the config. See [Data egress](https://cloud.google.com/bigquery/docs/analytics-hub-introduction#data_egress) for more details.
1004 */
1005 restrictions?: IRestrictionConfig;
1006 /**
1007 * Output only. Reserved for future use.
1008 */
1009 satisfiesPzi?: boolean;
1010 /**
1011 * Output only. Reserved for future use.
1012 */
1013 satisfiesPzs?: boolean;
1014 /**
1015 * 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.
1016 */
1017 selfLink?: string;
1018 /**
1019 * Optional. Updates storage_billing_model for the dataset.
1020 */
1021 storageBillingModel?:
1022 | 'STORAGE_BILLING_MODEL_UNSPECIFIED'
1023 | 'LOGICAL'
1024 | 'PHYSICAL';
1025 /**
1026 * Output only. Tags for the dataset. To provide tags as inputs, use the `resourceTags` field.
1027 */
1028 tags?: Array<{
1029 /**
1030 * Required. The namespaced friendly name of the tag key, e.g. "12345/environment" where 12345 is org id.
1031 */
1032 tagKey?: string;
1033 /**
1034 * Required. The friendly short name of the tag value, e.g. "production".
1035 */
1036 tagValue?: string;
1037 }>;
1038 /**
1039 * Output only. Same as `type` in `ListFormatDataset`. The type of the dataset, one of: * DEFAULT - only accessible by owner and authorized accounts, * PUBLIC - accessible by everyone, * LINKED - linked dataset, * EXTERNAL - dataset with definition in external metadata catalog.
1040 */
1041 type?: string;
1042 };
1043
1044 /**
1045 * Grants all resources of particular types in a particular dataset read access to the current dataset. Similar to how individually authorized views work, updates to any resource granted through its dataset (including creation of new resources) requires read permission to referenced resources, plus write permission to the authorizing dataset.
1046 */
1047 type IDatasetAccessEntry = {
1048 /**
1049 * The dataset this entry applies to
1050 */
1051 dataset?: IDatasetReference;
1052 /**
1053 * Which resources in the dataset this entry applies to. Currently, only views are supported, but additional target types may be added in the future.
1054 */
1055 targetTypes?: Array<'TARGET_TYPE_UNSPECIFIED' | 'VIEWS' | 'ROUTINES'>;
1056 };
1057
1058 /**
1059 * Response format for a page of results when listing datasets.
1060 */
1061 type IDatasetList = {
1062 /**
1063 * 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.
1064 */
1065 datasets?: Array<{
1066 /**
1067 * The dataset reference. Use this property to access specific parts of the dataset's ID, such as project ID or dataset ID.
1068 */
1069 datasetReference?: IDatasetReference;
1070 /**
1071 * An alternate name for the dataset. The friendly name is purely decorative in nature.
1072 */
1073 friendlyName?: string;
1074 /**
1075 * The fully-qualified, unique, opaque ID of the dataset.
1076 */
1077 id?: string;
1078 /**
1079 * The resource type. This property always returns the value "bigquery#dataset"
1080 */
1081 kind?: string;
1082 /**
1083 * The labels associated with this dataset. You can use these to organize and group your datasets.
1084 */
1085 labels?: {[key: string]: string};
1086 /**
1087 * The geographic location where the dataset resides.
1088 */
1089 location?: string;
1090 }>;
1091 /**
1092 * Output only. A hash value of the results page. You can use this property to determine if the page has changed since the last request.
1093 */
1094 etag?: string;
1095 /**
1096 * Output only. The resource type. This property always returns the value "bigquery#datasetList"
1097 */
1098 kind?: string;
1099 /**
1100 * A token that can be used to request the next results page. This property is omitted on the final results page.
1101 */
1102 nextPageToken?: string;
1103 /**
1104 * A list of skipped locations that were unreachable. For more information about BigQuery locations, see: https://cloud.google.com/bigquery/docs/locations. Example: "europe-west5"
1105 */
1106 unreachable?: Array<string>;
1107 };
1108
1109 /**
1110 * Identifier for a dataset.
1111 */
1112 type IDatasetReference = {
1113 /**
1114 * 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.
1115 */
1116 datasetId?: string;
1117 /**
1118 * Optional. The ID of the project containing this dataset.
1119 */
1120 projectId?: string;
1121 };
1122
1123 /**
1124 * Properties for the destination table.
1125 */
1126 type IDestinationTableProperties = {
1127 /**
1128 * 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.
1129 */
1130 description?: string;
1131 /**
1132 * Internal use only.
1133 */
1134 expirationTime?: string;
1135 /**
1136 * Optional. Friendly name for the destination table. If the table already exists, it should be same as the existing friendly name.
1137 */
1138 friendlyName?: string;
1139 /**
1140 * 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.
1141 */
1142 labels?: {[key: string]: string};
1143 };
1144
1145 /**
1146 * Represents privacy policy associated with "differential privacy" method.
1147 */
1148 type IDifferentialPrivacyPolicy = {
1149 /**
1150 * Optional. The total delta budget for all queries against the privacy-protected view. Each subscriber query against this view charges the amount of delta that is pre-defined by the contributor through the privacy policy delta_per_query field. If there is sufficient budget, then the subscriber query attempts to complete. It might still fail due to other reasons, in which case the charge is refunded. If there is insufficient budget the query is rejected. There might be multiple charge attempts if a single query references multiple views. In this case there must be sufficient budget for all charges or the query is rejected and charges are refunded in best effort. The budget does not have a refresh policy and can only be updated via ALTER VIEW or circumvented by creating a new view that can be queried with a fresh budget.
1151 */
1152 deltaBudget?: number;
1153 /**
1154 * Output only. The delta budget remaining. If budget is exhausted, no more queries are allowed. Note that the budget for queries that are in progress is deducted before the query executes. If the query fails or is cancelled then the budget is refunded. In this case the amount of budget remaining can increase.
1155 */
1156 deltaBudgetRemaining?: number;
1157 /**
1158 * Optional. The delta value that is used per query. Delta represents the probability that any row will fail to be epsilon differentially private. Indicates the risk associated with exposing aggregate rows in the result of a query.
1159 */
1160 deltaPerQuery?: number;
1161 /**
1162 * Optional. The total epsilon budget for all queries against the privacy-protected view. Each subscriber query against this view charges the amount of epsilon they request in their query. If there is sufficient budget, then the subscriber query attempts to complete. It might still fail due to other reasons, in which case the charge is refunded. If there is insufficient budget the query is rejected. There might be multiple charge attempts if a single query references multiple views. In this case there must be sufficient budget for all charges or the query is rejected and charges are refunded in best effort. The budget does not have a refresh policy and can only be updated via ALTER VIEW or circumvented by creating a new view that can be queried with a fresh budget.
1163 */
1164 epsilonBudget?: number;
1165 /**
1166 * Output only. The epsilon budget remaining. If budget is exhausted, no more queries are allowed. Note that the budget for queries that are in progress is deducted before the query executes. If the query fails or is cancelled then the budget is refunded. In this case the amount of budget remaining can increase.
1167 */
1168 epsilonBudgetRemaining?: number;
1169 /**
1170 * Optional. The maximum epsilon value that a query can consume. If the subscriber specifies epsilon as a parameter in a SELECT query, it must be less than or equal to this value. The epsilon parameter controls the amount of noise that is added to the groups — a higher epsilon means less noise.
1171 */
1172 maxEpsilonPerQuery?: number;
1173 /**
1174 * Optional. The maximum groups contributed value that is used per query. Represents the maximum number of groups to which each protected entity can contribute. Changing this value does not improve or worsen privacy. The best value for accuracy and utility depends on the query and data.
1175 */
1176 maxGroupsContributed?: string;
1177 /**
1178 * Optional. The privacy unit column associated with this policy. Differential privacy policies can only have one privacy unit column per data source object (table, view).
1179 */
1180 privacyUnitColumn?: string;
1181 };
1182
1183 /**
1184 * Model evaluation metrics for dimensionality reduction models.
1185 */
1186 type IDimensionalityReductionMetrics = {
1187 /**
1188 * Total percentage of variance explained by the selected principal components.
1189 */
1190 totalExplainedVarianceRatio?: number;
1191 };
1192
1193 /**
1194 * Detailed statistics for DML statements
1195 */
1196 type IDmlStatistics = {
1197 /**
1198 * Output only. Number of deleted Rows. populated by DML DELETE, MERGE and TRUNCATE statements.
1199 */
1200 deletedRowCount?: string;
1201 /**
1202 * Output only. Number of inserted Rows. Populated by DML INSERT and MERGE statements
1203 */
1204 insertedRowCount?: string;
1205 /**
1206 * Output only. Number of updated Rows. Populated by DML UPDATE and MERGE statements.
1207 */
1208 updatedRowCount?: string;
1209 };
1210
1211 /**
1212 * Discrete candidates of a double hyperparameter.
1213 */
1214 type IDoubleCandidates = {
1215 /**
1216 * Candidates for the double parameter in increasing order.
1217 */
1218 candidates?: Array<number>;
1219 };
1220
1221 /**
1222 * Search space for a double hyperparameter.
1223 */
1224 type IDoubleHparamSearchSpace = {
1225 /**
1226 * Candidates of the double hyperparameter.
1227 */
1228 candidates?: IDoubleCandidates;
1229 /**
1230 * Range of the double hyperparameter.
1231 */
1232 range?: IDoubleRange;
1233 };
1234
1235 /**
1236 * Range of a double hyperparameter.
1237 */
1238 type IDoubleRange = {
1239 /**
1240 * Max value of the double parameter.
1241 */
1242 max?: number;
1243 /**
1244 * Min value of the double parameter.
1245 */
1246 min?: number;
1247 };
1248
1249 /**
1250 * Configuration for Cloud KMS encryption settings.
1251 */
1252 type IEncryptionConfiguration = {
1253 /**
1254 * 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.
1255 */
1256 kmsKeyName?: string;
1257 };
1258
1259 /**
1260 * A single entry in the confusion matrix.
1261 */
1262 type IEntry = {
1263 /**
1264 * Number of items being predicted as this label.
1265 */
1266 itemCount?: string;
1267 /**
1268 * The predicted label. For confidence_threshold > 0, we will also add an entry indicating the number of items under the confidence threshold.
1269 */
1270 predictedLabel?: string;
1271 };
1272
1273 /**
1274 * Error details.
1275 */
1276 type IErrorProto = {
1277 /**
1278 * Debugging information. This property is internal to Google and should not be used.
1279 */
1280 debugInfo?: string;
1281 /**
1282 * Specifies where the error occurred, if present.
1283 */
1284 location?: string;
1285 /**
1286 * A human-readable description of the error.
1287 */
1288 message?: string;
1289 /**
1290 * A short error code that summarizes the error.
1291 */
1292 reason?: string;
1293 };
1294
1295 /**
1296 * 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.
1297 */
1298 type IEvaluationMetrics = {
1299 /**
1300 * Populated for ARIMA models.
1301 */
1302 arimaForecastingMetrics?: IArimaForecastingMetrics;
1303 /**
1304 * Populated for binary classification/classifier models.
1305 */
1306 binaryClassificationMetrics?: IBinaryClassificationMetrics;
1307 /**
1308 * Populated for clustering models.
1309 */
1310 clusteringMetrics?: IClusteringMetrics;
1311 /**
1312 * Evaluation metrics when the model is a dimensionality reduction model, which currently includes PCA.
1313 */
1314 dimensionalityReductionMetrics?: IDimensionalityReductionMetrics;
1315 /**
1316 * Populated for multi-class classification/classifier models.
1317 */
1318 multiClassClassificationMetrics?: IMultiClassClassificationMetrics;
1319 /**
1320 * Populated for implicit feedback type matrix factorization models.
1321 */
1322 rankingMetrics?: IRankingMetrics;
1323 /**
1324 * Populated for regression models and explicit feedback type matrix factorization models.
1325 */
1326 regressionMetrics?: IRegressionMetrics;
1327 };
1328
1329 /**
1330 * A single stage of query execution.
1331 */
1332 type IExplainQueryStage = {
1333 /**
1334 * Number of parallel input segments completed.
1335 */
1336 completedParallelInputs?: string;
1337 /**
1338 * Output only. Compute mode for this stage.
1339 */
1340 computeMode?: 'COMPUTE_MODE_UNSPECIFIED' | 'BIGQUERY' | 'BI_ENGINE';
1341 /**
1342 * Milliseconds the average shard spent on CPU-bound tasks.
1343 */
1344 computeMsAvg?: string;
1345 /**
1346 * Milliseconds the slowest shard spent on CPU-bound tasks.
1347 */
1348 computeMsMax?: string;
1349 /**
1350 * Relative amount of time the average shard spent on CPU-bound tasks.
1351 */
1352 computeRatioAvg?: number;
1353 /**
1354 * Relative amount of time the slowest shard spent on CPU-bound tasks.
1355 */
1356 computeRatioMax?: number;
1357 /**
1358 * Stage end time represented as milliseconds since the epoch.
1359 */
1360 endMs?: string;
1361 /**
1362 * Unique ID for the stage within the plan.
1363 */
1364 id?: string;
1365 /**
1366 * IDs for stages that are inputs to this stage.
1367 */
1368 inputStages?: Array<string>;
1369 /**
1370 * Human-readable name for the stage.
1371 */
1372 name?: string;
1373 /**
1374 * Number of parallel input segments to be processed
1375 */
1376 parallelInputs?: string;
1377 /**
1378 * Milliseconds the average shard spent reading input.
1379 */
1380 readMsAvg?: string;
1381 /**
1382 * Milliseconds the slowest shard spent reading input.
1383 */
1384 readMsMax?: string;
1385 /**
1386 * Relative amount of time the average shard spent reading input.
1387 */
1388 readRatioAvg?: number;
1389 /**
1390 * Relative amount of time the slowest shard spent reading input.
1391 */
1392 readRatioMax?: number;
1393 /**
1394 * Number of records read into the stage.
1395 */
1396 recordsRead?: string;
1397 /**
1398 * Number of records written by the stage.
1399 */
1400 recordsWritten?: string;
1401 /**
1402 * Total number of bytes written to shuffle.
1403 */
1404 shuffleOutputBytes?: string;
1405 /**
1406 * Total number of bytes written to shuffle and spilled to disk.
1407 */
1408 shuffleOutputBytesSpilled?: string;
1409 /**
1410 * Slot-milliseconds used by the stage.
1411 */
1412 slotMs?: string;
1413 /**
1414 * Stage start time represented as milliseconds since the epoch.
1415 */
1416 startMs?: string;
1417 /**
1418 * Current status for this stage.
1419 */
1420 status?: string;
1421 /**
1422 * List of operations within the stage in dependency order (approximately chronological).
1423 */
1424 steps?: Array<IExplainQueryStep>;
1425 /**
1426 * Milliseconds the average shard spent waiting to be scheduled.
1427 */
1428 waitMsAvg?: string;
1429 /**
1430 * Milliseconds the slowest shard spent waiting to be scheduled.
1431 */
1432 waitMsMax?: string;
1433 /**
1434 * Relative amount of time the average shard spent waiting to be scheduled.
1435 */
1436 waitRatioAvg?: number;
1437 /**
1438 * Relative amount of time the slowest shard spent waiting to be scheduled.
1439 */
1440 waitRatioMax?: number;
1441 /**
1442 * Milliseconds the average shard spent on writing output.
1443 */
1444 writeMsAvg?: string;
1445 /**
1446 * Milliseconds the slowest shard spent on writing output.
1447 */
1448 writeMsMax?: string;
1449 /**
1450 * Relative amount of time the average shard spent on writing output.
1451 */
1452 writeRatioAvg?: number;
1453 /**
1454 * Relative amount of time the slowest shard spent on writing output.
1455 */
1456 writeRatioMax?: number;
1457 };
1458
1459 /**
1460 * An operation within a stage.
1461 */
1462 type IExplainQueryStep = {
1463 /**
1464 * Machine-readable operation type.
1465 */
1466 kind?: string;
1467 /**
1468 * Human-readable description of the step(s).
1469 */
1470 substeps?: Array<string>;
1471 };
1472
1473 /**
1474 * Explanation for a single feature.
1475 */
1476 type IExplanation = {
1477 /**
1478 * Attribution of feature.
1479 */
1480 attribution?: number;
1481 /**
1482 * The full feature name. For non-numerical features, will be formatted like `.`. Overall size of feature name will always be truncated to first 120 characters.
1483 */
1484 featureName?: string;
1485 };
1486
1487 /**
1488 * Statistics for the EXPORT DATA statement as part of Query Job. EXTRACT JOB statistics are populated in JobStatistics4.
1489 */
1490 type IExportDataStatistics = {
1491 /**
1492 * Number of destination files generated in case of EXPORT DATA statement only.
1493 */
1494 fileCount?: string;
1495 /**
1496 * [Alpha] Number of destination rows generated in case of EXPORT DATA statement only.
1497 */
1498 rowCount?: string;
1499 };
1500
1501 /**
1502 * 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.
1503 */
1504 type IExpr = {
1505 /**
1506 * Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
1507 */
1508 description?: string;
1509 /**
1510 * Textual representation of an expression in Common Expression Language syntax.
1511 */
1512 expression?: string;
1513 /**
1514 * Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
1515 */
1516 location?: string;
1517 /**
1518 * 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.
1519 */
1520 title?: string;
1521 };
1522
1523 /**
1524 * Options defining open source compatible datasets living in the BigQuery catalog. Contains metadata of open source database, schema or namespace represented by the current dataset.
1525 */
1526 type IExternalCatalogDatasetOptions = {
1527 /**
1528 * Optional. The storage location URI for all tables in the dataset. Equivalent to hive metastore's database locationUri. Maximum length of 1024 characters.
1529 */
1530 defaultStorageLocationUri?: string;
1531 /**
1532 * Optional. A map of key value pairs defining the parameters and properties of the open source schema. Maximum size of 2Mib.
1533 */
1534 parameters?: {[key: string]: string};
1535 };
1536
1537 /**
1538 * Metadata about open source compatible table. The fields contained in these options correspond to hive metastore's table level properties.
1539 */
1540 type IExternalCatalogTableOptions = {
1541 /**
1542 * Optional. The connection specifying the credentials to be used to read external storage, such as Azure Blob, Cloud Storage, or S3. The connection is needed to read the open source table from BigQuery Engine. The connection_id can have the form `..` or `projects//locations//connections/`.
1543 */
1544 connectionId?: string;
1545 /**
1546 * Optional. A map of key value pairs defining the parameters and properties of the open source table. Corresponds with hive meta store table parameters. Maximum size of 4Mib.
1547 */
1548 parameters?: {[key: string]: string};
1549 /**
1550 * Optional. A storage descriptor containing information about the physical storage of this table.
1551 */
1552 storageDescriptor?: IStorageDescriptor;
1553 };
1554
1555 type IExternalDataConfiguration = {
1556 /**
1557 * Try to detect schema and format options automatically. Any option specified explicitly will be honored.
1558 */
1559 autodetect?: boolean;
1560 /**
1561 * Optional. Additional properties to set if sourceFormat is set to AVRO.
1562 */
1563 avroOptions?: IAvroOptions;
1564 /**
1565 * Optional. Additional options if sourceFormat is set to BIGTABLE.
1566 */
1567 bigtableOptions?: IBigtableOptions;
1568 /**
1569 * 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, Avro, ORC and Parquet formats. An empty string is an invalid value.
1570 */
1571 compression?: string;
1572 /**
1573 * Optional. The connection specifying the credentials to be used to read external storage, such as Azure Blob, Cloud Storage, or S3. The connection_id can have the form `{project_id}.{location_id};{connection_id}` or `projects/{project_id}/locations/{location_id}/connections/{connection_id}`.
1574 */
1575 connectionId?: string;
1576 /**
1577 * Optional. Additional properties to set if sourceFormat is set to CSV.
1578 */
1579 csvOptions?: ICsvOptions;
1580 /**
1581 * 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.
1582 */
1583 decimalTargetTypes?: Array<
1584 'DECIMAL_TARGET_TYPE_UNSPECIFIED' | 'NUMERIC' | 'BIGNUMERIC' | 'STRING'
1585 >;
1586 /**
1587 * Optional. Specifies how source URIs are interpreted for constructing the file set to load. By default source URIs are expanded against the underlying storage. Other options include specifying manifest files. Only applicable to object storage systems.
1588 */
1589 fileSetSpecType?:
1590 | 'FILE_SET_SPEC_TYPE_FILE_SYSTEM_MATCH'
1591 | 'FILE_SET_SPEC_TYPE_NEW_LINE_DELIMITED_MANIFEST';
1592 /**
1593 * Optional. Additional options if sourceFormat is set to GOOGLE_SHEETS.
1594 */
1595 googleSheetsOptions?: IGoogleSheetsOptions;
1596 /**
1597 * Optional. When set, configures hive partitioning support. Not all storage formats support hive partitioning -- requesting hive partitioning on an unsupported format will lead to an error, as will providing an invalid specification.
1598 */
1599 hivePartitioningOptions?: IHivePartitioningOptions;
1600 /**
1601 * 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. ORC: This setting is ignored. Parquet: This setting is ignored.
1602 */
1603 ignoreUnknownValues?: boolean;
1604 /**
1605 * Optional. Load option to be used together with source_format newline-delimited JSON to indicate that a variant of JSON is being loaded. To load newline-delimited GeoJSON, specify GEOJSON (and source_format must be set to NEWLINE_DELIMITED_JSON).
1606 */
1607 jsonExtension?: 'JSON_EXTENSION_UNSPECIFIED' | 'GEOJSON';
1608 /**
1609 * Optional. Additional properties to set if sourceFormat is set to JSON.
1610 */
1611 jsonOptions?: IJsonOptions;
1612 /**
1613 * 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. The default value is 0, which requires that all records are valid. This setting is ignored for Google Cloud Bigtable, Google Cloud Datastore backups, Avro, ORC and Parquet formats.
1614 */
1615 maxBadRecords?: number;
1616 /**
1617 * Optional. Metadata Cache Mode for the table. Set this to enable caching of metadata from external data source.
1618 */
1619 metadataCacheMode?:
1620 | 'METADATA_CACHE_MODE_UNSPECIFIED'
1621 | 'AUTOMATIC'
1622 | 'MANUAL';
1623 /**
1624 * Optional. ObjectMetadata is used to create Object Tables. Object Tables contain a listing of objects (with their metadata) found at the source_uris. If ObjectMetadata is set, source_format should be omitted. Currently SIMPLE is the only supported Object Metadata type.
1625 */
1626 objectMetadata?: 'OBJECT_METADATA_UNSPECIFIED' | 'DIRECTORY' | 'SIMPLE';
1627 /**
1628 * Optional. Additional properties to set if sourceFormat is set to PARQUET.
1629 */
1630 parquetOptions?: IParquetOptions;
1631 /**
1632 * Optional. When creating an external table, the user can provide a reference file with the table schema. This is enabled for the following formats: AVRO, PARQUET, ORC.
1633 */
1634 referenceFileSchemaUri?: string;
1635 /**
1636 * Optional. The schema for the data. Schema is required for CSV and JSON formats if autodetect is not on. Schema is disallowed for Google Cloud Bigtable, Cloud Datastore backups, Avro, ORC and Parquet formats.
1637 */
1638 schema?: ITableSchema;
1639 /**
1640 * [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". For Apache Iceberg tables, specify "ICEBERG". For ORC files, specify "ORC". For Parquet files, specify "PARQUET". [Beta] For Google Cloud Bigtable, specify "BIGTABLE".
1641 */
1642 sourceFormat?: string;
1643 /**
1644 * [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.
1645 */
1646 sourceUris?: Array<string>;
1647 };
1648
1649 /**
1650 * Configures the access a dataset defined in an external metadata storage.
1651 */
1652 type IExternalDatasetReference = {
1653 /**
1654 * Required. The connection id that is used to access the external_source. Format: projects/{project_id}/locations/{location_id}/connections/{connection_id}
1655 */
1656 connection?: string;
1657 /**
1658 * Required. External source that backs this dataset.
1659 */
1660 externalSource?: string;
1661 };
1662
1663 /**
1664 * The external service cost is a portion of the total cost, these costs are not additive with total_bytes_billed. Moreover, this field only track external service costs that will show up as BigQuery costs (e.g. training BigQuery ML job with google cloud CAIP or Automl Tables services), not other costs which may be accrued by running the query (e.g. reading from Bigtable or Cloud Storage). The external service costs with different billing sku (e.g. CAIP job is charged based on VM usage) are converted to BigQuery billed_bytes and slot_ms with equivalent amount of US dollars. Services may not directly correlate to these metrics, but these are the equivalents for billing purposes. Output only.
1665 */
1666 type IExternalServiceCost = {
1667 /**
1668 * External service cost in terms of bigquery bytes billed.
1669 */
1670 bytesBilled?: string;
1671 /**
1672 * External service cost in terms of bigquery bytes processed.
1673 */
1674 bytesProcessed?: string;
1675 /**
1676 * External service name.
1677 */
1678 externalService?: string;
1679 /**
1680 * Non-preemptable reserved slots used for external job. For example, reserved slots for Cloua AI Platform job are the VM usages converted to BigQuery slot with equivalent mount of price.
1681 */
1682 reservedSlotCount?: string;
1683 /**
1684 * External service cost in terms of bigquery slot milliseconds.
1685 */
1686 slotMs?: string;
1687 };
1688
1689 /**
1690 * Representative value of a single feature within the cluster.
1691 */
1692 type IFeatureValue = {
1693 /**
1694 * The categorical feature value.
1695 */
1696 categoricalValue?: ICategoricalValue;
1697 /**
1698 * The feature column name.
1699 */
1700 featureColumn?: string;
1701 /**
1702 * The numerical feature value. This is the centroid value for this feature.
1703 */
1704 numericalValue?: number;
1705 };
1706
1707 /**
1708 * Metadata about the foreign data type definition such as the system in which the type is defined.
1709 */
1710 type IForeignTypeInfo = {
1711 /**
1712 * Required. Specifies the system which defines the foreign data type.
1713 */
1714 typeSystem?: 'TYPE_SYSTEM_UNSPECIFIED' | 'HIVE';
1715 };
1716
1717 /**
1718 * A view can be represented in multiple ways. Each representation has its own dialect. This message stores the metadata required for these representations.
1719 */
1720 type IForeignViewDefinition = {
1721 /**
1722 * Optional. Represents the dialect of the query.
1723 */
1724 dialect?: string;
1725 /**
1726 * Required. The query that defines the view.
1727 */
1728 query?: string;
1729 };
1730
1731 /**
1732 * Request message for `GetIamPolicy` method.
1733 */
1734 type IGetIamPolicyRequest = {
1735 /**
1736 * OPTIONAL: A `GetPolicyOptions` object for specifying options to `GetIamPolicy`.
1737 */
1738 options?: IGetPolicyOptions;
1739 };
1740
1741 /**
1742 * Encapsulates settings provided to GetIamPolicy.
1743 */
1744 type IGetPolicyOptions = {
1745 /**
1746 * 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).
1747 */
1748 requestedPolicyVersion?: number;
1749 };
1750
1751 /**
1752 * Response object of GetQueryResults.
1753 */
1754 type IGetQueryResultsResponse = {
1755 /**
1756 * Whether the query result was fetched from the query cache.
1757 */
1758 cacheHit?: boolean;
1759 /**
1760 * 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. For more information about error messages, see [Error messages](https://cloud.google.com/bigquery/docs/error-messages).
1761 */
1762 errors?: Array<IErrorProto>;
1763 /**
1764 * A hash of this response.
1765 */
1766 etag?: string;
1767 /**
1768 * 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.
1769 */
1770 jobComplete?: boolean;
1771 /**
1772 * 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).
1773 */
1774 jobReference?: IJobReference;
1775 /**
1776 * The resource type of the response.
1777 */
1778 kind?: string;
1779 /**
1780 * Output only. The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE.
1781 */
1782 numDmlAffectedRows?: string;
1783 /**
1784 * A token used for paging results. When this token is non-empty, it indicates additional results are available.
1785 */
1786 pageToken?: string;
1787 /**
1788 * 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. The REST-based representation of this data leverages a series of JSON f,v objects for indicating fields and values.
1789 */
1790 rows?: Array<ITableRow>;
1791 /**
1792 * The schema of the results. Present only when the query completes successfully.
1793 */
1794 schema?: ITableSchema;
1795 /**
1796 * The total number of bytes processed for this query.
1797 */
1798 totalBytesProcessed?: string;
1799 /**
1800 * 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.
1801 */
1802 totalRows?: string;
1803 };
1804
1805 /**
1806 * Response object of GetServiceAccount
1807 */
1808 type IGetServiceAccountResponse = {
1809 /**
1810 * The service account email address.
1811 */
1812 email?: string;
1813 /**
1814 * The resource type of the response.
1815 */
1816 kind?: string;
1817 };
1818
1819 /**
1820 * Global explanations containing the top most important features after training.
1821 */
1822 type IGlobalExplanation = {
1823 /**
1824 * Class label for this set of global explanations. Will be empty/null for binary logistic and linear regression models. Sorted alphabetically in descending order.
1825 */
1826 classLabel?: string;
1827 /**
1828 * A list of the top global explanations. Sorted by absolute value of attribution in descending order.
1829 */
1830 explanations?: Array<IExplanation>;
1831 };
1832
1833 /**
1834 * Options specific to Google Sheets data sources.
1835 */
1836 type IGoogleSheetsOptions = {
1837 /**
1838 * 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
1839 */
1840 range?: string;
1841 /**
1842 * 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, 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.
1843 */
1844 skipLeadingRows?: string;
1845 };
1846
1847 /**
1848 * High cardinality join detailed information.
1849 */
1850 type IHighCardinalityJoin = {
1851 /**
1852 * Output only. Count of left input rows.
1853 */
1854 leftRows?: string;
1855 /**
1856 * Output only. Count of the output rows.
1857 */
1858 outputRows?: string;
1859 /**
1860 * Output only. Count of right input rows.
1861 */
1862 rightRows?: string;
1863 /**
1864 * Output only. The index of the join operator in the ExplainQueryStep lists.
1865 */
1866 stepIndex?: number;
1867 };
1868
1869 /**
1870 * Options for configuring hive partitioning detect.
1871 */
1872 type IHivePartitioningOptions = {
1873 /**
1874 * Output only. For permanent external tables, this field is populated with the hive partition keys in the order they were inferred. The types of the partition keys can be deduced by checking the table schema (which will include the partition keys). Not every API will populate this field in the output. For example, Tables.Get will populate it, but Tables.List will not contain this field.
1875 */
1876 fields?: Array<string>;
1877 /**
1878 * Optional. When set, what mode of hive partitioning to use when reading data. The following modes are supported: * AUTO: automatically infer partition key name(s) and type(s). * STRINGS: automatically infer partition key name(s). All types are strings. * 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 formats are: JSON, CSV, ORC, Avro and Parquet.
1879 */
1880 mode?: string;
1881 /**
1882 * 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 require_partition_filter explicitly set to true will fail.
1883 */
1884 requirePartitionFilter?: boolean;
1885 /**
1886 * Optional. When hive partition detection is requested, a common prefix for all source uris must be required. 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-06-01/country=USA/id=7/file.avro gs://bucket/path_to_table/dt=2019-05-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/. CUSTOM detection requires encoding the partitioning schema immediately after the common prefix. For CUSTOM, any of * gs://bucket/path_to_table/{dt:DATE}/{country:STRING}/{id:INTEGER} * gs://bucket/path_to_table/{dt:STRING}/{country:STRING}/{id:INTEGER} * gs://bucket/path_to_table/{dt:DATE}/{country:STRING}/{id:STRING} would all be valid source URI prefixes.
1887 */
1888 sourceUriPrefix?: string;
1889 };
1890
1891 /**
1892 * Hyperparameter search spaces. These should be a subset of training_options.
1893 */
1894 type IHparamSearchSpaces = {
1895 /**
1896 * Activation functions of neural network models.
1897 */
1898 activationFn?: IStringHparamSearchSpace;
1899 /**
1900 * Mini batch sample size.
1901 */
1902 batchSize?: IIntHparamSearchSpace;
1903 /**
1904 * Booster type for boosted tree models.
1905 */
1906 boosterType?: IStringHparamSearchSpace;
1907 /**
1908 * Subsample ratio of columns for each level for boosted tree models.
1909 */
1910 colsampleBylevel?: IDoubleHparamSearchSpace;
1911 /**
1912 * Subsample ratio of columns for each node(split) for boosted tree models.
1913 */
1914 colsampleBynode?: IDoubleHparamSearchSpace;
1915 /**
1916 * Subsample ratio of columns when constructing each tree for boosted tree models.
1917 */
1918 colsampleBytree?: IDoubleHparamSearchSpace;
1919 /**
1920 * Dart normalization type for boosted tree models.
1921 */
1922 dartNormalizeType?: IStringHparamSearchSpace;
1923 /**
1924 * Dropout probability for dnn model training and boosted tree models using dart booster.
1925 */
1926 dropout?: IDoubleHparamSearchSpace;
1927 /**
1928 * Hidden units for neural network models.
1929 */
1930 hiddenUnits?: IIntArrayHparamSearchSpace;
1931 /**
1932 * L1 regularization coefficient.
1933 */
1934 l1Reg?: IDoubleHparamSearchSpace;
1935 /**
1936 * L2 regularization coefficient.
1937 */
1938 l2Reg?: IDoubleHparamSearchSpace;
1939 /**
1940 * Learning rate of training jobs.
1941 */
1942 learnRate?: IDoubleHparamSearchSpace;
1943 /**
1944 * Maximum depth of a tree for boosted tree models.
1945 */
1946 maxTreeDepth?: IIntHparamSearchSpace;
1947 /**
1948 * Minimum split loss for boosted tree models.
1949 */
1950 minSplitLoss?: IDoubleHparamSearchSpace;
1951 /**
1952 * Minimum sum of instance weight needed in a child for boosted tree models.
1953 */
1954 minTreeChildWeight?: IIntHparamSearchSpace;
1955 /**
1956 * Number of clusters for k-means.
1957 */
1958 numClusters?: IIntHparamSearchSpace;
1959 /**
1960 * Number of latent factors to train on.
1961 */
1962 numFactors?: IIntHparamSearchSpace;
1963 /**
1964 * Number of parallel trees for boosted tree models.
1965 */
1966 numParallelTree?: IIntHparamSearchSpace;
1967 /**
1968 * Optimizer of TF models.
1969 */
1970 optimizer?: IStringHparamSearchSpace;
1971 /**
1972 * Subsample the training data to grow tree to prevent overfitting for boosted tree models.
1973 */
1974 subsample?: IDoubleHparamSearchSpace;
1975 /**
1976 * Tree construction algorithm for boosted tree models.
1977 */
1978 treeMethod?: IStringHparamSearchSpace;
1979 /**
1980 * Hyperparameter for matrix factoration when implicit feedback type is specified.
1981 */
1982 walsAlpha?: IDoubleHparamSearchSpace;
1983 };
1984
1985 /**
1986 * Training info of a trial in [hyperparameter tuning](https://cloud.google.com/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overview) models.
1987 */
1988 type IHparamTuningTrial = {
1989 /**
1990 * Ending time of the trial.
1991 */
1992 endTimeMs?: string;
1993 /**
1994 * Error message for FAILED and INFEASIBLE trial.
1995 */
1996 errorMessage?: string;
1997 /**
1998 * Loss computed on the eval data at the end of trial.
1999 */
2000 evalLoss?: number;
2001 /**
2002 * Evaluation metrics of this trial calculated on the test data. Empty in Job API.
2003 */
2004 evaluationMetrics?: IEvaluationMetrics;
2005 /**
2006 * Hyperparameter tuning evaluation metrics of this trial calculated on the eval data. Unlike evaluation_metrics, only the fields corresponding to the hparam_tuning_objectives are set.
2007 */
2008 hparamTuningEvaluationMetrics?: IEvaluationMetrics;
2009 /**
2010 * The hyperprameters selected for this trial.
2011 */
2012 hparams?: ITrainingOptions;
2013 /**
2014 * Starting time of the trial.
2015 */
2016 startTimeMs?: string;
2017 /**
2018 * The status of the trial.
2019 */
2020 status?:
2021 | 'TRIAL_STATUS_UNSPECIFIED'
2022 | 'NOT_STARTED'
2023 | 'RUNNING'
2024 | 'SUCCEEDED'
2025 | 'FAILED'
2026 | 'INFEASIBLE'
2027 | 'STOPPED_EARLY';
2028 /**
2029 * Loss computed on the training data at the end of trial.
2030 */
2031 trainingLoss?: number;
2032 /**
2033 * 1-based index of the trial.
2034 */
2035 trialId?: string;
2036 };
2037
2038 /**
2039 * Reason about why no search index was used in the search query (or sub-query).
2040 */
2041 type IIndexUnusedReason = {
2042 /**
2043 * Specifies the base table involved in the reason that no search index was used.
2044 */
2045 baseTable?: ITableReference;
2046 /**
2047 * Specifies the high-level reason for the scenario when no search index was used.
2048 */
2049 code?:
2050 | 'CODE_UNSPECIFIED'
2051 | 'INDEX_CONFIG_NOT_AVAILABLE'
2052 | 'PENDING_INDEX_CREATION'
2053 | 'BASE_TABLE_TRUNCATED'
2054 | 'INDEX_CONFIG_MODIFIED'
2055 | 'TIME_TRAVEL_QUERY'
2056 | 'NO_PRUNING_POWER'
2057 | 'UNINDEXED_SEARCH_FIELDS'
2058 | 'UNSUPPORTED_SEARCH_PATTERN'
2059 | 'OPTIMIZED_WITH_MATERIALIZED_VIEW'
2060 | 'SECURED_BY_DATA_MASKING'
2061 | 'MISMATCHED_TEXT_ANALYZER'
2062 | 'BASE_TABLE_TOO_SMALL'
2063 | 'BASE_TABLE_TOO_LARGE'
2064 | 'ESTIMATED_PERFORMANCE_GAIN_TOO_LOW'
2065 | 'NOT_SUPPORTED_IN_STANDARD_EDITION'
2066 | 'INDEX_SUPPRESSED_BY_FUNCTION_OPTION'
2067 | 'QUERY_CACHE_HIT'
2068 | 'STALE_INDEX'
2069 | 'INTERNAL_ERROR'
2070 | 'OTHER_REASON';
2071 /**
2072 * Specifies the name of the unused search index, if available.
2073 */
2074 indexName?: string;
2075 /**
2076 * Free form human-readable reason for the scenario when no search index was used.
2077 */
2078 message?: string;
2079 };
2080
2081 /**
2082 * Details about the input data change insight.
2083 */
2084 type IInputDataChange = {
2085 /**
2086 * Output only. Records read difference percentage compared to a previous run.
2087 */
2088 recordsReadDiffPercentage?: number;
2089 };
2090
2091 /**
2092 * An array of int.
2093 */
2094 type IIntArray = {
2095 /**
2096 * Elements in the int array.
2097 */
2098 elements?: Array<string>;
2099 };
2100
2101 /**
2102 * Search space for int array.
2103 */
2104 type IIntArrayHparamSearchSpace = {
2105 /**
2106 * Candidates for the int array parameter.
2107 */
2108 candidates?: Array<IIntArray>;
2109 };
2110
2111 /**
2112 * Discrete candidates of an int hyperparameter.
2113 */
2114 type IIntCandidates = {
2115 /**
2116 * Candidates for the int parameter in increasing order.
2117 */
2118 candidates?: Array<string>;
2119 };
2120
2121 /**
2122 * Search space for an int hyperparameter.
2123 */
2124 type IIntHparamSearchSpace = {
2125 /**
2126 * Candidates of the int hyperparameter.
2127 */
2128 candidates?: IIntCandidates;
2129 /**
2130 * Range of the int hyperparameter.
2131 */
2132 range?: IIntRange;
2133 };
2134
2135 /**
2136 * Range of an int hyperparameter.
2137 */
2138 type IIntRange = {
2139 /**
2140 * Max value of the int parameter.
2141 */
2142 max?: string;
2143 /**
2144 * Min value of the int parameter.
2145 */
2146 min?: string;
2147 };
2148
2149 /**
2150 * Information about a single iteration of the training run.
2151 */
2152 type IIterationResult = {
2153 /**
2154 * Arima result.
2155 */
2156 arimaResult?: IArimaResult;
2157 /**
2158 * Information about top clusters for clustering models.
2159 */
2160 clusterInfos?: Array<IClusterInfo>;
2161 /**
2162 * Time taken to run the iteration in milliseconds.
2163 */
2164 durationMs?: string;
2165 /**
2166 * Loss computed on the eval data at the end of iteration.
2167 */
2168 evalLoss?: number;
2169 /**
2170 * Index of the iteration, 0 based.
2171 */
2172 index?: number;
2173 /**
2174 * Learn rate used for this iteration.
2175 */
2176 learnRate?: number;
2177 /**
2178 * The information of the principal components.
2179 */
2180 principalComponentInfos?: Array<IPrincipalComponentInfo>;
2181 /**
2182 * Loss computed on the training data at the end of iteration.
2183 */
2184 trainingLoss?: number;
2185 };
2186
2187 type IJob = {
2188 /**
2189 * Required. Describes the job configuration.
2190 */
2191 configuration?: IJobConfiguration;
2192 /**
2193 * Output only. A hash of this resource.
2194 */
2195 etag?: string;
2196 /**
2197 * Output only. Opaque ID field of the job.
2198 */
2199 id?: string;
2200 /**
2201 * Output only. The reason why a Job was created. [Preview](https://cloud.google.com/products/#product-launch-stages)
2202 */
2203 jobCreationReason?: IJobCreationReason;
2204 /**
2205 * Optional. Reference describing the unique-per-user name of the job.
2206 */
2207 jobReference?: IJobReference;
2208 /**
2209 * Output only. The type of the resource.
2210 */
2211 kind?: string;
2212 /**
2213 * Output only. [Full-projection-only] String representation of identity of requesting party. Populated for both first- and third-party identities. Only present for APIs that support third-party identities.
2214 */
2215 principal_subject?: string;
2216 /**
2217 * Output only. A URL that can be used to access the resource again.
2218 */
2219 selfLink?: string;
2220 /**
2221 * Output only. Information about the job, including starting time and ending time of the job.
2222 */
2223 statistics?: IJobStatistics;
2224 /**
2225 * Output only. The status of this job. Examine this value when polling an asynchronous job to see if the job is complete.
2226 */
2227 status?: IJobStatus;
2228 /**
2229 * Output only. Email address of the user who ran the job.
2230 */
2231 user_email?: string;
2232 };
2233
2234 /**
2235 * Describes format of a jobs cancellation response.
2236 */
2237 type IJobCancelResponse = {
2238 /**
2239 * The final state of the job.
2240 */
2241 job?: IJob;
2242 /**
2243 * The resource type of the response.
2244 */
2245 kind?: string;
2246 };
2247
2248 type IJobConfiguration = {
2249 /**
2250 * [Pick one] Copies a table.
2251 */
2252 copy?: IJobConfigurationTableCopy;
2253 /**
2254 * 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.
2255 */
2256 dryRun?: boolean;
2257 /**
2258 * [Pick one] Configures an extract job.
2259 */
2260 extract?: IJobConfigurationExtract;
2261 /**
2262 * Optional. Job timeout in milliseconds. If this time limit is exceeded, BigQuery will attempt to stop a longer job, but may not always succeed in canceling it before the job completes. For example, a job that takes more than 60 seconds to complete has a better chance of being stopped than a job that takes 10 seconds to complete.
2263 */
2264 jobTimeoutMs?: string;
2265 /**
2266 * Output only. The type of the job. Can be QUERY, LOAD, EXTRACT, COPY or UNKNOWN.
2267 */
2268 jobType?: string;
2269 /**
2270 * 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.
2271 */
2272 labels?: {[key: string]: string};
2273 /**
2274 * [Pick one] Configures a load job.
2275 */
2276 load?: IJobConfigurationLoad;
2277 /**
2278 * [Pick one] Configures a query job.
2279 */
2280 query?: IJobConfigurationQuery;
2281 };
2282
2283 /**
2284 * JobConfigurationExtract configures a job that exports data from a BigQuery table into Google Cloud Storage.
2285 */
2286 type IJobConfigurationExtract = {
2287 /**
2288 * Optional. The compression type to use for exported files. Possible values include DEFLATE, GZIP, NONE, SNAPPY, and ZSTD. The default value is NONE. Not all compression formats are support for all file formats. DEFLATE is only supported for Avro. ZSTD is only supported for Parquet. Not applicable when extracting models.
2289 */
2290 compression?: string;
2291 /**
2292 * 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.
2293 */
2294 destinationFormat?: string;
2295 /**
2296 * [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.
2297 */
2298 destinationUri?: string;
2299 /**
2300 * [Pick one] A list of fully-qualified Google Cloud Storage URIs where the extracted table should be written.
2301 */
2302 destinationUris?: Array<string>;
2303 /**
2304 * Optional. When extracting data in CSV format, this defines the delimiter to use between fields in the exported data. Default is ','. Not applicable when extracting models.
2305 */
2306 fieldDelimiter?: string;
2307 /**
2308 * Optional. Model extract options only applicable when extracting models.
2309 */
2310 modelExtractOptions?: IModelExtractOptions;
2311 /**
2312 * Optional. Whether to print out a header row in the results. Default is true. Not applicable when extracting models.
2313 */
2314 printHeader?: boolean;
2315 /**
2316 * A reference to the model being exported.
2317 */
2318 sourceModel?: IModelReference;
2319 /**
2320 * A reference to the table being exported.
2321 */
2322 sourceTable?: ITableReference;
2323 /**
2324 * Whether to use logical types when extracting to AVRO format. Not applicable when extracting models.
2325 */
2326 useAvroLogicalTypes?: boolean;
2327 };
2328
2329 /**
2330 * JobConfigurationLoad contains the configuration properties for loading data into a destination table.
2331 */
2332 type IJobConfigurationLoad = {
2333 /**
2334 * 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.
2335 */
2336 allowJaggedRows?: boolean;
2337 /**
2338 * Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false.
2339 */
2340 allowQuotedNewlines?: boolean;
2341 /**
2342 * Optional. Indicates if we should automatically infer the options and schema for CSV and JSON sources.
2343 */
2344 autodetect?: boolean;
2345 /**
2346 * Clustering specification for the destination table.
2347 */
2348 clustering?: IClustering;
2349 /**
2350 * Optional. Character map supported for column names in CSV/Parquet loads. Defaults to STRICT and can be overridden by Project Config Service. Using this option with unsupporting load formats will result in an error.
2351 */
2352 columnNameCharacterMap?:
2353 | 'COLUMN_NAME_CHARACTER_MAP_UNSPECIFIED'
2354 | 'STRICT'
2355 | 'V1'
2356 | 'V2';
2357 /**
2358 * Optional. Connection properties which can modify the load job behavior. Currently, only the 'session_id' connection property is supported, and is used to resolve _SESSION appearing as the dataset id.
2359 */
2360 connectionProperties?: Array<IConnectionProperty>;
2361 /**
2362 * Optional. [Experimental] Configures the load job to copy files directly to the destination BigLake managed table, bypassing file content reading and rewriting. Copying files only is supported when all the following are true: * `source_uris` are located in the same Cloud Storage location as the destination table's `storage_uri` location. * `source_format` is `PARQUET`. * `destination_table` is an existing BigLake managed table. The table's schema does not have flexible column names. The table's columns do not have type parameters other than precision and scale. * No options other than the above are specified.
2363 */
2364 copyFilesOnly?: boolean;
2365 /**
2366 * 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.
2367 */
2368 createDisposition?: string;
2369 /**
2370 * Optional. If this property is true, the job creates a new session using a randomly generated session_id. To continue using a created session with subsequent queries, pass the existing session identifier as a `ConnectionProperty` value. The session identifier is returned as part of the `SessionInfo` message within the query statistics. The new session's location will be set to `Job.JobReference.location` if it is present, otherwise it's set to the default location based on existing routing logic.
2371 */
2372 createSession?: boolean;
2373 /**
2374 * 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.
2375 */
2376 decimalTargetTypes?: Array<
2377 'DECIMAL_TARGET_TYPE_UNSPECIFIED' | 'NUMERIC' | 'BIGNUMERIC' | 'STRING'
2378 >;
2379 /**
2380 * Custom encryption configuration (e.g., Cloud KMS keys)
2381 */
2382 destinationEncryptionConfiguration?: IEncryptionConfiguration;
2383 /**
2384 * [Required] The destination table to load the data into.
2385 */
2386 destinationTable?: ITableReference;
2387 /**
2388 * Optional. [Experimental] Properties with which to create the destination table if it is new.
2389 */
2390 destinationTableProperties?: IDestinationTableProperties;
2391 /**
2392 * Optional. The character encoding of the data. The supported values are UTF-8, ISO-8859-1, UTF-16BE, UTF-16LE, UTF-32BE, and UTF-32LE. 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. If you don't specify an encoding, or if you specify a UTF-8 encoding when the CSV file is not UTF-8 encoded, BigQuery attempts to convert the data to UTF-8. Generally, your data loads successfully, but it may not match byte-for-byte what you expect. To avoid this, specify the correct encoding by using the `--encoding` flag. If BigQuery can't convert a character other than the ASCII `0` character, BigQuery converts the character to the standard Unicode replacement character: �.
2393 */
2394 encoding?: string;
2395 /**
2396 * Optional. The separator character for fields in a CSV file. The separator is interpreted as a single byte. For files encoded in ISO-8859-1, any single character can be used as a separator. For files encoded in UTF-8, characters represented in decimal range 1-127 (U+0001-U+007F) can be used without any modification. UTF-8 characters encoded with multiple bytes (i.e. U+0080 and above) will have only the first byte used for separating fields. The remaining bytes will be treated as a part of the field. BigQuery also supports the escape sequence "\t" (U+0009) to specify a tab separator. The default value is comma (",", U+002C).
2397 */
2398 fieldDelimiter?: string;
2399 /**
2400 * Optional. Specifies how source URIs are interpreted for constructing the file set to load. By default, source URIs are expanded against the underlying storage. You can also specify manifest files to control how the file set is constructed. This option is only applicable to object storage systems.
2401 */
2402 fileSetSpecType?:
2403 | 'FILE_SET_SPEC_TYPE_FILE_SYSTEM_MATCH'
2404 | 'FILE_SET_SPEC_TYPE_NEW_LINE_DELIMITED_MANIFEST';
2405 /**
2406 * Optional. When set, configures hive partitioning support. Not all storage formats support hive partitioning -- requesting hive partitioning on an unsupported format will lead to an error, as will providing an invalid specification.
2407 */
2408 hivePartitioningOptions?: IHivePartitioningOptions;
2409 /**
2410 * 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 in the table schema Avro, Parquet, ORC: Fields in the file schema that don't exist in the table schema.
2411 */
2412 ignoreUnknownValues?: boolean;
2413 /**
2414 * Optional. Load option to be used together with source_format newline-delimited JSON to indicate that a variant of JSON is being loaded. To load newline-delimited GeoJSON, specify GEOJSON (and source_format must be set to NEWLINE_DELIMITED_JSON).
2415 */
2416 jsonExtension?: 'JSON_EXTENSION_UNSPECIFIED' | 'GEOJSON';
2417 /**
2418 * 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. The default value is 0, which requires that all records are valid. This is only supported for CSV and NEWLINE_DELIMITED_JSON file formats.
2419 */
2420 maxBadRecords?: number;
2421 /**
2422 * 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.
2423 */
2424 nullMarker?: string;
2425 /**
2426 * Optional. Additional properties to set if sourceFormat is set to PARQUET.
2427 */
2428 parquetOptions?: IParquetOptions;
2429 /**
2430 * Optional. When sourceFormat is set to "CSV", this indicates whether the embedded ASCII control characters (the first 32 characters in the ASCII-table, from '\x00' to '\x1F') are preserved.
2431 */
2432 preserveAsciiControlCharacters?: boolean;
2433 /**
2434 * 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.
2435 */
2436 projectionFields?: Array<string>;
2437 /**
2438 * 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. To include the specific quote character within a quoted value, precede it with an additional matching quote character. For example, if you want to escape the default character ' " ', use ' "" '. @default "
2439 */
2440 quote?: string;
2441 /**
2442 * Range partitioning specification for the destination table. Only one of timePartitioning and rangePartitioning should be specified.
2443 */
2444 rangePartitioning?: IRangePartitioning;
2445 /**
2446 * Optional. The user can provide a reference file with the reader schema. This file is only loaded if it is part of source URIs, but is not loaded otherwise. It is enabled for the following formats: AVRO, PARQUET, ORC.
2447 */
2448 referenceFileSchemaUri?: string;
2449 /**
2450 * 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.
2451 */
2452 schema?: ITableSchema;
2453 /**
2454 * [Deprecated] The inline schema. For CSV schemas, specify as "Field1:Type1[,Field2:Type2]*". For example, "foo:STRING, bar:INTEGER, baz:FLOAT".
2455 */
2456 schemaInline?: string;
2457 /**
2458 * [Deprecated] The format of the schemaInline property.
2459 */
2460 schemaInlineFormat?: string;
2461 /**
2462 * 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.
2463 */
2464 schemaUpdateOptions?: Array<string>;
2465 /**
2466 * 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. 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.
2467 */
2468 skipLeadingRows?: number;
2469 /**
2470 * 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.
2471 */
2472 sourceFormat?: string;
2473 /**
2474 * [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.
2475 */
2476 sourceUris?: Array<string>;
2477 /**
2478 * Time-based partitioning specification for the destination table. Only one of timePartitioning and rangePartitioning should be specified.
2479 */
2480 timePartitioning?: ITimePartitioning;
2481 /**
2482 * 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).
2483 */
2484 useAvroLogicalTypes?: boolean;
2485 /**
2486 * 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 data, removes the constraints and uses the schema from the load job. * 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.
2487 */
2488 writeDisposition?: string;
2489 };
2490
2491 /**
2492 * JobConfigurationQuery configures a BigQuery query job.
2493 */
2494 type IJobConfigurationQuery = {
2495 /**
2496 * 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 GoogleSQL 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.
2497 */
2498 allowLargeResults?: boolean;
2499 /**
2500 * Clustering specification for the destination table.
2501 */
2502 clustering?: IClustering;
2503 /**
2504 * Connection properties which can modify the query behavior.
2505 */
2506 connectionProperties?: Array<IConnectionProperty>;
2507 /**
2508 * [Optional] Specifies whether the query should be executed as a continuous query. The default value is false.
2509 */
2510 continuous?: boolean;
2511 /**
2512 * 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.
2513 */
2514 createDisposition?: string;
2515 /**
2516 * If this property is true, the job creates a new session using a randomly generated session_id. To continue using a created session with subsequent queries, pass the existing session identifier as a `ConnectionProperty` value. The session identifier is returned as part of the `SessionInfo` message within the query statistics. The new session's location will be set to `Job.JobReference.location` if it is present, otherwise it's set to the default location based on existing routing logic.
2517 */
2518 createSession?: boolean;
2519 /**
2520 * Optional. Specifies the default dataset to use for unqualified table names in the query. This setting does not alter behavior of unqualified dataset names. Setting the system variable `@@dataset_id` achieves the same behavior. See https://cloud.google.com/bigquery/docs/reference/system-variables for more information on system variables.
2521 */
2522 defaultDataset?: IDatasetReference;
2523 /**
2524 * Custom encryption configuration (e.g., Cloud KMS keys)
2525 */
2526 destinationEncryptionConfiguration?: IEncryptionConfiguration;
2527 /**
2528 * Optional. Describes the table where the query results should be stored. This property must be set for large results that exceed the maximum response size. For queries that produce anonymous (cached) results, this field will be populated by BigQuery.
2529 */
2530 destinationTable?: ITableReference;
2531 /**
2532 * 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 GoogleSQL queries, this flag is ignored and results are never flattened.
2533 */
2534 flattenResults?: boolean;
2535 /**
2536 * Optional. [Deprecated] Maximum billing tier allowed for this query. The billing tier controls the amount of compute resources allotted to the query, and multiplies the on-demand cost of the query accordingly. A query that runs within its allotted resources will succeed and indicate its billing tier in statistics.query.billingTier, but if the query exceeds its allotted resources, it will fail with billingTierLimitExceeded. WARNING: The billed byte amount can be multiplied by an amount up to this number! Most users should not need to alter this setting, and we recommend that you avoid introducing new uses of it.
2537 */
2538 maximumBillingTier?: number;
2539 /**
2540 * 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.
2541 */
2542 maximumBytesBilled?: string;
2543 /**
2544 * GoogleSQL only. Set to POSITIONAL to use positional (?) query parameters or to NAMED to use named (@myparam) query parameters in this query.
2545 */
2546 parameterMode?: string;
2547 /**
2548 * [Deprecated] This property is deprecated.
2549 */
2550 preserveNulls?: boolean;
2551 /**
2552 * Optional. Specifies a priority for the query. Possible values include INTERACTIVE and BATCH. The default value is INTERACTIVE.
2553 */
2554 priority?: string;
2555 /**
2556 * [Required] SQL query text to execute. The useLegacySql field can be used to indicate whether the query uses legacy SQL or GoogleSQL.
2557 */
2558 query?: string;
2559 /**
2560 * Query parameters for GoogleSQL queries.
2561 */
2562 queryParameters?: Array<IQueryParameter>;
2563 /**
2564 * Range partitioning specification for the destination table. Only one of timePartitioning and rangePartitioning should be specified.
2565 */
2566 rangePartitioning?: IRangePartitioning;
2567 /**
2568 * 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.
2569 */
2570 schemaUpdateOptions?: Array<string>;
2571 /**
2572 * Options controlling the execution of scripts.
2573 */
2574 scriptOptions?: IScriptOptions;
2575 /**
2576 * Output only. System variables for GoogleSQL queries. A system variable is output if the variable is settable and its value differs from the system default. "@@" prefix is not included in the name of the System variables.
2577 */
2578 systemVariables?: ISystemVariables;
2579 /**
2580 * Optional. You can specify external table definitions, which operate as ephemeral tables that can be queried. These definitions are configured using a JSON map, where the string key represents the table identifier, and the value is the corresponding external data configuration object.
2581 */
2582 tableDefinitions?: {[key: string]: IExternalDataConfiguration};
2583 /**
2584 * Time-based partitioning specification for the destination table. Only one of timePartitioning and rangePartitioning should be specified.
2585 */
2586 timePartitioning?: ITimePartitioning;
2587 /**
2588 * Optional. 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 GoogleSQL: 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.
2589 */
2590 useLegacySql?: boolean;
2591 /**
2592 * 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.
2593 */
2594 useQueryCache?: boolean;
2595 /**
2596 * Describes user-defined function resources used in the query.
2597 */
2598 userDefinedFunctionResources?: Array<IUserDefinedFunctionResource>;
2599 /**
2600 * 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 data, removes the constraints, 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.
2601 */
2602 writeDisposition?: string;
2603 };
2604
2605 /**
2606 * JobConfigurationTableCopy configures a job that copies data from one table to another. For more information on copying tables, see [Copy a table](https://cloud.google.com/bigquery/docs/managing-tables#copy-table).
2607 */
2608 type IJobConfigurationTableCopy = {
2609 /**
2610 * 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.
2611 */
2612 createDisposition?: string;
2613 /**
2614 * Custom encryption configuration (e.g., Cloud KMS keys).
2615 */
2616 destinationEncryptionConfiguration?: IEncryptionConfiguration;
2617 /**
2618 * Optional. The time when the destination table expires. Expired tables will be deleted and their storage reclaimed.
2619 */
2620 destinationExpirationTime?: string;
2621 /**
2622 * [Required] The destination table.
2623 */
2624 destinationTable?: ITableReference;
2625 /**
2626 * Optional. Supported operation types in table copy job.
2627 */
2628 operationType?:
2629 | 'OPERATION_TYPE_UNSPECIFIED'
2630 | 'COPY'
2631 | 'SNAPSHOT'
2632 | 'RESTORE'
2633 | 'CLONE';
2634 /**
2635 * [Pick one] Source table to copy.
2636 */
2637 sourceTable?: ITableReference;
2638 /**
2639 * [Pick one] Source tables to copy.
2640 */
2641 sourceTables?: Array<ITableReference>;
2642 /**
2643 * 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 and table constraints from the source table. * 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.
2644 */
2645 writeDisposition?: string;
2646 };
2647
2648 /**
2649 * Reason about why a Job was created from a [`jobs.query`](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query) method when used with `JOB_CREATION_OPTIONAL` Job creation mode. For [`jobs.insert`](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/insert) method calls it will always be `REQUESTED`. [Preview](https://cloud.google.com/products/#product-launch-stages)
2650 */
2651 type IJobCreationReason = {
2652 /**
2653 * Output only. Specifies the high level reason why a Job was created.
2654 */
2655 code?:
2656 | 'CODE_UNSPECIFIED'
2657 | 'REQUESTED'
2658 | 'LONG_RUNNING'
2659 | 'LARGE_RESULTS'
2660 | 'OTHER';
2661 };
2662
2663 /**
2664 * JobList is the response format for a jobs.list call.
2665 */
2666 type IJobList = {
2667 /**
2668 * A hash of this page of results.
2669 */
2670 etag?: string;
2671 /**
2672 * List of jobs that were requested.
2673 */
2674 jobs?: Array<{
2675 /**
2676 * Required. Describes the job configuration.
2677 */
2678 configuration?: IJobConfiguration;
2679 /**
2680 * A result object that will be present only if the job has failed.
2681 */
2682 errorResult?: IErrorProto;
2683 /**
2684 * Unique opaque ID of the job.
2685 */
2686 id?: string;
2687 /**
2688 * Unique opaque ID of the job.
2689 */
2690 jobReference?: IJobReference;
2691 /**
2692 * The resource type.
2693 */
2694 kind?: string;
2695 /**
2696 * [Full-projection-only] String representation of identity of requesting party. Populated for both first- and third-party identities. Only present for APIs that support third-party identities.
2697 */
2698 principal_subject?: string;
2699 /**
2700 * Running state of the job. When the state is DONE, errorResult can be checked to determine whether the job succeeded or failed.
2701 */
2702 state?: string;
2703 /**
2704 * Output only. Information about the job, including starting time and ending time of the job.
2705 */
2706 statistics?: IJobStatistics;
2707 /**
2708 * [Full-projection-only] Describes the status of this job.
2709 */
2710 status?: IJobStatus;
2711 /**
2712 * [Full-projection-only] Email address of the user who ran the job.
2713 */
2714 user_email?: string;
2715 }>;
2716 /**
2717 * The resource type of the response.
2718 */
2719 kind?: string;
2720 /**
2721 * A token to request the next page of results.
2722 */
2723 nextPageToken?: string;
2724 /**
2725 * A list of skipped locations that were unreachable. For more information about BigQuery locations, see: https://cloud.google.com/bigquery/docs/locations. Example: "europe-west5"
2726 */
2727 unreachable?: Array<string>;
2728 };
2729
2730 /**
2731 * A job reference is a fully qualified identifier for referring to a job.
2732 */
2733 type IJobReference = {
2734 /**
2735 * 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.
2736 */
2737 jobId?: string;
2738 /**
2739 * Optional. The geographic location of the job. The default value is US. For more information about BigQuery locations, see: https://cloud.google.com/bigquery/docs/locations
2740 */
2741 location?: string;
2742 /**
2743 * Required. The ID of the project containing this job.
2744 */
2745 projectId?: string;
2746 };
2747
2748 /**
2749 * Statistics for a single job execution.
2750 */
2751 type IJobStatistics = {
2752 /**
2753 * Output only. [TrustedTester] Job progress (0.0 -> 1.0) for LOAD and EXTRACT jobs.
2754 */
2755 completionRatio?: number;
2756 /**
2757 * Output only. Statistics for a copy job.
2758 */
2759 copy?: IJobStatistics5;
2760 /**
2761 * Output only. Creation time of this job, in milliseconds since the epoch. This field will be present on all jobs.
2762 */
2763 creationTime?: string;
2764 /**
2765 * Output only. Statistics for data-masking. Present only for query and extract jobs.
2766 */
2767 dataMaskingStatistics?: IDataMaskingStatistics;
2768 /**
2769 * Output only. Name of edition corresponding to the reservation for this job at the time of this update.
2770 */
2771 edition?:
2772 | 'RESERVATION_EDITION_UNSPECIFIED'
2773 | 'STANDARD'
2774 | 'ENTERPRISE'
2775 | 'ENTERPRISE_PLUS';
2776 /**
2777 * 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.
2778 */
2779 endTime?: string;
2780 /**
2781 * Output only. Statistics for an extract job.
2782 */
2783 extract?: IJobStatistics4;
2784 /**
2785 * Output only. The duration in milliseconds of the execution of the final attempt of this job, as BigQuery may internally re-attempt to execute the job.
2786 */
2787 finalExecutionDurationMs?: string;
2788 /**
2789 * Output only. Statistics for a load job.
2790 */
2791 load?: IJobStatistics3;
2792 /**
2793 * Output only. Number of child jobs executed.
2794 */
2795 numChildJobs?: string;
2796 /**
2797 * Output only. If this is a child job, specifies the job ID of the parent.
2798 */
2799 parentJobId?: string;
2800 /**
2801 * Output only. Statistics for a query job.
2802 */
2803 query?: IJobStatistics2;
2804 /**
2805 * Output only. Quotas which delayed this job's start time.
2806 */
2807 quotaDeferments?: Array<string>;
2808 /**
2809 * Output only. Job resource usage breakdown by reservation. This field reported misleading information and will no longer be populated.
2810 */
2811 reservationUsage?: Array<{
2812 /**
2813 * Reservation name or "unreserved" for on-demand resource usage and multi-statement queries.
2814 */
2815 name?: string;
2816 /**
2817 * Total slot milliseconds used by the reservation for a particular job.
2818 */
2819 slotMs?: string;
2820 }>;
2821 /**
2822 * 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.
2823 */
2824 reservation_id?: string;
2825 /**
2826 * Output only. Statistics for row-level security. Present only for query and extract jobs.
2827 */
2828 rowLevelSecurityStatistics?: IRowLevelSecurityStatistics;
2829 /**
2830 * Output only. If this a child job of a script, specifies information about the context of this job within the script.
2831 */
2832 scriptStatistics?: IScriptStatistics;
2833 /**
2834 * Output only. Information of the session if this job is part of one.
2835 */
2836 sessionInfo?: ISessionInfo;
2837 /**
2838 * 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.
2839 */
2840 startTime?: string;
2841 /**
2842 * Output only. Total bytes processed for the job.
2843 */
2844 totalBytesProcessed?: string;
2845 /**
2846 * Output only. Slot-milliseconds for the job.
2847 */
2848 totalSlotMs?: string;
2849 /**
2850 * Output only. [Alpha] Information of the multi-statement transaction if this job is part of one. This property is only expected on a child job or a job that is in a session. A script parent job is not part of the transaction started in the script.
2851 */
2852 transactionInfo?: ITransactionInfo;
2853 };
2854
2855 /**
2856 * Statistics for a query job.
2857 */
2858 type IJobStatistics2 = {
2859 /**
2860 * Output only. BI Engine specific Statistics.
2861 */
2862 biEngineStatistics?: IBiEngineStatistics;
2863 /**
2864 * Output only. Billing tier for the job. This is a BigQuery-specific concept which is not related to the Google Cloud notion of "free tier". The value here is a measure of the query's resource consumption relative to the amount of data scanned. For on-demand queries, the limit is 100, and all queries within this limit are billed at the standard on-demand rates. On-demand queries that exceed this limit will fail with a billingTierLimitExceeded error.
2865 */
2866 billingTier?: number;
2867 /**
2868 * Output only. Whether the query result was fetched from the query cache.
2869 */
2870 cacheHit?: boolean;
2871 /**
2872 * Output only. Referenced dataset for DCL statement.
2873 */
2874 dclTargetDataset?: IDatasetReference;
2875 /**
2876 * Output only. Referenced table for DCL statement.
2877 */
2878 dclTargetTable?: ITableReference;
2879 /**
2880 * Output only. Referenced view for DCL statement.
2881 */
2882 dclTargetView?: ITableReference;
2883 /**
2884 * Output only. The number of row access policies affected by a DDL statement. Present only for DROP ALL ROW ACCESS POLICIES queries.
2885 */
2886 ddlAffectedRowAccessPolicyCount?: string;
2887 /**
2888 * Output only. The table after rename. Present only for ALTER TABLE RENAME TO query.
2889 */
2890 ddlDestinationTable?: ITableReference;
2891 /**
2892 * Output only. The DDL operation performed, possibly dependent on the pre-existence of the DDL target.
2893 */
2894 ddlOperationPerformed?: string;
2895 /**
2896 * Output only. The DDL target dataset. Present only for CREATE/ALTER/DROP SCHEMA(dataset) queries.
2897 */
2898 ddlTargetDataset?: IDatasetReference;
2899 /**
2900 * Output only. [Beta] The DDL target routine. Present only for CREATE/DROP FUNCTION/PROCEDURE queries.
2901 */
2902 ddlTargetRoutine?: IRoutineReference;
2903 /**
2904 * Output only. The DDL target row access policy. Present only for CREATE/DROP ROW ACCESS POLICY queries.
2905 */
2906 ddlTargetRowAccessPolicy?: IRowAccessPolicyReference;
2907 /**
2908 * Output only. The DDL target table. Present only for CREATE/DROP TABLE/VIEW and DROP ALL ROW ACCESS POLICIES queries.
2909 */
2910 ddlTargetTable?: ITableReference;
2911 /**
2912 * Output only. Detailed statistics for DML statements INSERT, UPDATE, DELETE, MERGE or TRUNCATE.
2913 */
2914 dmlStats?: IDmlStatistics;
2915 /**
2916 * Output only. The original estimate of bytes processed for the job.
2917 */
2918 estimatedBytesProcessed?: string;
2919 /**
2920 * Output only. Stats for EXPORT DATA statement.
2921 */
2922 exportDataStatistics?: IExportDataStatistics;
2923 /**
2924 * Output only. Job cost breakdown as bigquery internal cost and external service costs.
2925 */
2926 externalServiceCosts?: Array<IExternalServiceCost>;
2927 /**
2928 * Output only. Statistics for a LOAD query.
2929 */
2930 loadQueryStatistics?: ILoadQueryStatistics;
2931 /**
2932 * Output only. Statistics of materialized views of a query job.
2933 */
2934 materializedViewStatistics?: IMaterializedViewStatistics;
2935 /**
2936 * Output only. Statistics of metadata cache usage in a query for BigLake tables.
2937 */
2938 metadataCacheStatistics?: IMetadataCacheStatistics;
2939 /**
2940 * Output only. Statistics of a BigQuery ML training job.
2941 */
2942 mlStatistics?: IMlStatistics;
2943 /**
2944 * Deprecated.
2945 */
2946 modelTraining?: IBigQueryModelTraining;
2947 /**
2948 * Deprecated.
2949 */
2950 modelTrainingCurrentIteration?: number;
2951 /**
2952 * Deprecated.
2953 */
2954 modelTrainingExpectedTotalIteration?: string;
2955 /**
2956 * Output only. The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE.
2957 */
2958 numDmlAffectedRows?: string;
2959 /**
2960 * Output only. Performance insights.
2961 */
2962 performanceInsights?: IPerformanceInsights;
2963 /**
2964 * Output only. Query optimization information for a QUERY job.
2965 */
2966 queryInfo?: IQueryInfo;
2967 /**
2968 * Output only. Describes execution plan for the query.
2969 */
2970 queryPlan?: Array<IExplainQueryStage>;
2971 /**
2972 * Output only. Referenced routines for the job.
2973 */
2974 referencedRoutines?: Array<IRoutineReference>;
2975 /**
2976 * Output only. Referenced tables for the job. Queries that reference more than 50 tables will not have a complete list.
2977 */
2978 referencedTables?: Array<ITableReference>;
2979 /**
2980 * Output only. Job resource usage breakdown by reservation. This field reported misleading information and will no longer be populated.
2981 */
2982 reservationUsage?: Array<{
2983 /**
2984 * Reservation name or "unreserved" for on-demand resource usage and multi-statement queries.
2985 */
2986 name?: string;
2987 /**
2988 * Total slot milliseconds used by the reservation for a particular job.
2989 */
2990 slotMs?: string;
2991 }>;
2992 /**
2993 * Output only. The schema of the results. Present only for successful dry run of non-legacy SQL queries.
2994 */
2995 schema?: ITableSchema;
2996 /**
2997 * Output only. Search query specific statistics.
2998 */
2999 searchStatistics?: ISearchStatistics;
3000 /**
3001 * Output only. Statistics of a Spark procedure job.
3002 */
3003 sparkStatistics?: ISparkStatistics;
3004 /**
3005 * Output only. The type of query statement, if valid. Possible values: * `SELECT`: [`SELECT`](https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax#select_list) statement. * `ASSERT`: [`ASSERT`](https://cloud.google.com/bigquery/docs/reference/standard-sql/debugging-statements#assert) statement. * `INSERT`: [`INSERT`](https://cloud.google.com/bigquery/docs/reference/standard-sql/dml-syntax#insert_statement) statement. * `UPDATE`: [`UPDATE`](https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax#update_statement) statement. * `DELETE`: [`DELETE`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language) statement. * `MERGE`: [`MERGE`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language) statement. * `CREATE_TABLE`: [`CREATE TABLE`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#create_table_statement) statement, without `AS SELECT`. * `CREATE_TABLE_AS_SELECT`: [`CREATE TABLE AS SELECT`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#query_statement) statement. * `CREATE_VIEW`: [`CREATE VIEW`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#create_view_statement) statement. * `CREATE_MODEL`: [`CREATE MODEL`](https://cloud.google.com/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-create#create_model_statement) statement. * `CREATE_MATERIALIZED_VIEW`: [`CREATE MATERIALIZED VIEW`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#create_materialized_view_statement) statement. * `CREATE_FUNCTION`: [`CREATE FUNCTION`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#create_function_statement) statement. * `CREATE_TABLE_FUNCTION`: [`CREATE TABLE FUNCTION`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#create_table_function_statement) statement. * `CREATE_PROCEDURE`: [`CREATE PROCEDURE`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#create_procedure) statement. * `CREATE_ROW_ACCESS_POLICY`: [`CREATE ROW ACCESS POLICY`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#create_row_access_policy_statement) statement. * `CREATE_SCHEMA`: [`CREATE SCHEMA`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#create_schema_statement) statement. * `CREATE_SNAPSHOT_TABLE`: [`CREATE SNAPSHOT TABLE`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#create_snapshot_table_statement) statement. * `CREATE_SEARCH_INDEX`: [`CREATE SEARCH INDEX`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#create_search_index_statement) statement. * `DROP_TABLE`: [`DROP TABLE`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#drop_table_statement) statement. * `DROP_EXTERNAL_TABLE`: [`DROP EXTERNAL TABLE`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#drop_external_table_statement) statement. * `DROP_VIEW`: [`DROP VIEW`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#drop_view_statement) statement. * `DROP_MODEL`: [`DROP MODEL`](https://cloud.google.com/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-drop-model) statement. * `DROP_MATERIALIZED_VIEW`: [`DROP MATERIALIZED VIEW`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#drop_materialized_view_statement) statement. * `DROP_FUNCTION` : [`DROP FUNCTION`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#drop_function_statement) statement. * `DROP_TABLE_FUNCTION` : [`DROP TABLE FUNCTION`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#drop_table_function) statement. * `DROP_PROCEDURE`: [`DROP PROCEDURE`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#drop_procedure_statement) statement. * `DROP_SEARCH_INDEX`: [`DROP SEARCH INDEX`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#drop_search_index) statement. * `DROP_SCHEMA`: [`DROP SCHEMA`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#drop_schema_statement) statement. * `DROP_SNAPSHOT_TABLE`: [`DROP SNAPSHOT TABLE`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#drop_snapshot_table_statement) statement. * `DROP_ROW_ACCESS_POLICY`: [`DROP [ALL] ROW ACCESS POLICY|POLICIES`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#drop_row_access_policy_statement) statement. * `ALTER_TABLE`: [`ALTER TABLE`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#alter_table_set_options_statement) statement. * `ALTER_VIEW`: [`ALTER VIEW`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#alter_view_set_options_statement) statement. * `ALTER_MATERIALIZED_VIEW`: [`ALTER MATERIALIZED VIEW`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#alter_materialized_view_set_options_statement) statement. * `ALTER_SCHEMA`: [`ALTER SCHEMA`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#aalter_schema_set_options_statement) statement. * `SCRIPT`: [`SCRIPT`](https://cloud.google.com/bigquery/docs/reference/standard-sql/procedural-language). * `TRUNCATE_TABLE`: [`TRUNCATE TABLE`](https://cloud.google.com/bigquery/docs/reference/standard-sql/dml-syntax#truncate_table_statement) statement. * `CREATE_EXTERNAL_TABLE`: [`CREATE EXTERNAL TABLE`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#create_external_table_statement) statement. * `EXPORT_DATA`: [`EXPORT DATA`](https://cloud.google.com/bigquery/docs/reference/standard-sql/other-statements#export_data_statement) statement. * `EXPORT_MODEL`: [`EXPORT MODEL`](https://cloud.google.com/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-export-model) statement. * `LOAD_DATA`: [`LOAD DATA`](https://cloud.google.com/bigquery/docs/reference/standard-sql/other-statements#load_data_statement) statement. * `CALL`: [`CALL`](https://cloud.google.com/bigquery/docs/reference/standard-sql/procedural-language#call) statement.
3006 */
3007 statementType?: string;
3008 /**
3009 * Output only. Describes a timeline of job execution.
3010 */
3011 timeline?: Array<IQueryTimelineSample>;
3012 /**
3013 * Output only. If the project is configured to use on-demand pricing, then this field contains the total bytes billed for the job. If the project is configured to use flat-rate pricing, then you are not billed for bytes and this field is informational only.
3014 */
3015 totalBytesBilled?: string;
3016 /**
3017 * Output only. Total bytes processed for the job.
3018 */
3019 totalBytesProcessed?: string;
3020 /**
3021 * 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.
3022 */
3023 totalBytesProcessedAccuracy?: string;
3024 /**
3025 * Output only. Total number of partitions processed from all partitioned tables referenced in the job.
3026 */
3027 totalPartitionsProcessed?: string;
3028 /**
3029 * Output only. Slot-milliseconds for the job.
3030 */
3031 totalSlotMs?: string;
3032 /**
3033 * Output only. Total bytes transferred for cross-cloud queries such as Cross Cloud Transfer and CREATE TABLE AS SELECT (CTAS).
3034 */
3035 transferredBytes?: string;
3036 /**
3037 * Output only. GoogleSQL only: list of undeclared query parameters detected during a dry run validation.
3038 */
3039 undeclaredQueryParameters?: Array<IQueryParameter>;
3040 /**
3041 * Output only. Vector Search query specific statistics.
3042 */
3043 vectorSearchStatistics?: IVectorSearchStatistics;
3044 };
3045
3046 /**
3047 * Statistics for a load job.
3048 */
3049 type IJobStatistics3 = {
3050 /**
3051 * 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.
3052 */
3053 badRecords?: string;
3054 /**
3055 * Output only. Number of bytes of source data in a load job.
3056 */
3057 inputFileBytes?: string;
3058 /**
3059 * Output only. Number of source files in a load job.
3060 */
3061 inputFiles?: string;
3062 /**
3063 * Output only. Size of the loaded data in bytes. Note that while a load job is in the running state, this value may change.
3064 */
3065 outputBytes?: string;
3066 /**
3067 * 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.
3068 */
3069 outputRows?: string;
3070 /**
3071 * Output only. Describes a timeline of job execution.
3072 */
3073 timeline?: Array<IQueryTimelineSample>;
3074 };
3075
3076 /**
3077 * Statistics for an extract job.
3078 */
3079 type IJobStatistics4 = {
3080 /**
3081 * 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.
3082 */
3083 destinationUriFileCounts?: Array<string>;
3084 /**
3085 * Output only. Number of user bytes extracted into the result. This is the byte count as computed by BigQuery for billing purposes and doesn't have any relationship with the number of actual result bytes extracted in the desired format.
3086 */
3087 inputBytes?: string;
3088 /**
3089 * Output only. Describes a timeline of job execution.
3090 */
3091 timeline?: Array<IQueryTimelineSample>;
3092 };
3093
3094 /**
3095 * Statistics for a copy job.
3096 */
3097 type IJobStatistics5 = {
3098 /**
3099 * Output only. Number of logical bytes copied to the destination table.
3100 */
3101 copiedLogicalBytes?: string;
3102 /**
3103 * Output only. Number of rows copied to the destination table.
3104 */
3105 copiedRows?: string;
3106 };
3107
3108 type IJobStatus = {
3109 /**
3110 * Output only. Final error result of the job. If present, indicates that the job has completed and was unsuccessful.
3111 */
3112 errorResult?: IErrorProto;
3113 /**
3114 * 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 not completed or was unsuccessful.
3115 */
3116 errors?: Array<IErrorProto>;
3117 /**
3118 * Output only. Running state of the job. Valid states include 'PENDING', 'RUNNING', and 'DONE'.
3119 */
3120 state?: string;
3121 };
3122
3123 /**
3124 * Represents privacy policy associated with "join restrictions". Join restriction gives data providers the ability to enforce joins on the 'join_allowed_columns' when data is queried from a privacy protected view.
3125 */
3126 type IJoinRestrictionPolicy = {
3127 /**
3128 * Optional. The only columns that joins are allowed on. This field is must be specified for join_conditions JOIN_ANY and JOIN_ALL and it cannot be set for JOIN_BLOCKED.
3129 */
3130 joinAllowedColumns?: Array<string>;
3131 /**
3132 * Optional. Specifies if a join is required or not on queries for the view. Default is JOIN_CONDITION_UNSPECIFIED.
3133 */
3134 joinCondition?:
3135 | 'JOIN_CONDITION_UNSPECIFIED'
3136 | 'JOIN_ANY'
3137 | 'JOIN_ALL'
3138 | 'JOIN_NOT_REQUIRED'
3139 | 'JOIN_BLOCKED';
3140 };
3141
3142 /**
3143 * Represents a single JSON object.
3144 */
3145 type IJsonObject = {[key: string]: IJsonValue};
3146
3147 /**
3148 * Json Options for load and make external tables.
3149 */
3150 type IJsonOptions = {
3151 /**
3152 * Optional. The character encoding of the data. The supported values are UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, and UTF-32LE. The default value is UTF-8.
3153 */
3154 encoding?: string;
3155 };
3156
3157 type IJsonValue = any;
3158
3159 /**
3160 * Metadata about the Linked Dataset.
3161 */
3162 type ILinkedDatasetMetadata = {
3163 /**
3164 * Output only. Specifies whether Linked Dataset is currently in a linked state or not.
3165 */
3166 linkState?: 'LINK_STATE_UNSPECIFIED' | 'LINKED' | 'UNLINKED';
3167 };
3168
3169 /**
3170 * A dataset source type which refers to another BigQuery dataset.
3171 */
3172 type ILinkedDatasetSource = {
3173 /**
3174 * The source dataset reference contains project numbers and not project ids.
3175 */
3176 sourceDataset?: IDatasetReference;
3177 };
3178
3179 /**
3180 * Response format for a single page when listing BigQuery ML models.
3181 */
3182 type IListModelsResponse = {
3183 /**
3184 * Models in the requested dataset. Only the following fields are populated: model_reference, model_type, creation_time, last_modified_time and labels.
3185 */
3186 models?: Array<IModel>;
3187 /**
3188 * A token to request the next page of results.
3189 */
3190 nextPageToken?: string;
3191 };
3192
3193 /**
3194 * Describes the format of a single result page when listing routines.
3195 */
3196 type IListRoutinesResponse = {
3197 /**
3198 * A token to request the next page of results.
3199 */
3200 nextPageToken?: string;
3201 /**
3202 * 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, language, and remote_function_options.
3203 */
3204 routines?: Array<IRoutine>;
3205 };
3206
3207 /**
3208 * Response message for the ListRowAccessPolicies method.
3209 */
3210 type IListRowAccessPoliciesResponse = {
3211 /**
3212 * A token to request the next page of results.
3213 */
3214 nextPageToken?: string;
3215 /**
3216 * Row access policies on the requested table.
3217 */
3218 rowAccessPolicies?: Array<IRowAccessPolicy>;
3219 };
3220
3221 /**
3222 * Statistics for a LOAD query.
3223 */
3224 type ILoadQueryStatistics = {
3225 /**
3226 * Output only. The number of bad records encountered while processing a LOAD query. 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.
3227 */
3228 badRecords?: string;
3229 /**
3230 * Output only. This field is deprecated. The number of bytes of source data copied over the network for a `LOAD` query. `transferred_bytes` has the canonical value for physical transferred bytes, which is used for BigQuery Omni billing.
3231 */
3232 bytesTransferred?: string;
3233 /**
3234 * Output only. Number of bytes of source data in a LOAD query.
3235 */
3236 inputFileBytes?: string;
3237 /**
3238 * Output only. Number of source files in a LOAD query.
3239 */
3240 inputFiles?: string;
3241 /**
3242 * Output only. Size of the loaded data in bytes. Note that while a LOAD query is in the running state, this value may change.
3243 */
3244 outputBytes?: string;
3245 /**
3246 * Output only. Number of rows imported in a LOAD query. Note that while a LOAD query is in the running state, this value may change.
3247 */
3248 outputRows?: string;
3249 };
3250
3251 /**
3252 * BigQuery-specific metadata about a location. This will be set on google.cloud.location.Location.metadata in Cloud Location API responses.
3253 */
3254 type ILocationMetadata = {
3255 /**
3256 * 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.
3257 */
3258 legacyLocationId?: string;
3259 };
3260
3261 /**
3262 * A materialized view considered for a query job.
3263 */
3264 type IMaterializedView = {
3265 /**
3266 * Whether the materialized view is chosen for the query. A materialized view can be chosen to rewrite multiple parts of the same query. If a materialized view is chosen to rewrite any part of the query, then this field is true, even if the materialized view was not chosen to rewrite others parts.
3267 */
3268 chosen?: boolean;
3269 /**
3270 * If present, specifies a best-effort estimation of the bytes saved by using the materialized view rather than its base tables.
3271 */
3272 estimatedBytesSaved?: string;
3273 /**
3274 * If present, specifies the reason why the materialized view was not chosen for the query.
3275 */
3276 rejectedReason?:
3277 | 'REJECTED_REASON_UNSPECIFIED'
3278 | 'NO_DATA'
3279 | 'COST'
3280 | 'BASE_TABLE_TRUNCATED'
3281 | 'BASE_TABLE_DATA_CHANGE'
3282 | 'BASE_TABLE_PARTITION_EXPIRATION_CHANGE'
3283 | 'BASE_TABLE_EXPIRED_PARTITION'
3284 | 'BASE_TABLE_INCOMPATIBLE_METADATA_CHANGE'
3285 | 'TIME_ZONE'
3286 | 'OUT_OF_TIME_TRAVEL_WINDOW'
3287 | 'BASE_TABLE_FINE_GRAINED_SECURITY_POLICY'
3288 | 'BASE_TABLE_TOO_STALE';
3289 /**
3290 * The candidate materialized view.
3291 */
3292 tableReference?: ITableReference;
3293 };
3294
3295 /**
3296 * Definition and configuration of a materialized view.
3297 */
3298 type IMaterializedViewDefinition = {
3299 /**
3300 * Optional. This option declares the intention to construct a materialized view that isn't refreshed incrementally.
3301 */
3302 allowNonIncrementalDefinition?: boolean;
3303 /**
3304 * Optional. Enable automatic refresh of the materialized view when the base table is updated. The default value is "true".
3305 */
3306 enableRefresh?: boolean;
3307 /**
3308 * Output only. The time when this materialized view was last refreshed, in milliseconds since the epoch.
3309 */
3310 lastRefreshTime?: string;
3311 /**
3312 * [Optional] Max staleness of data that could be returned when materizlized view is queried (formatted as Google SQL Interval type).
3313 */
3314 maxStaleness?: string;
3315 /**
3316 * Required. A query whose results are persisted.
3317 */
3318 query?: string;
3319 /**
3320 * Optional. The maximum frequency at which this materialized view will be refreshed. The default value is "1800000" (30 minutes).
3321 */
3322 refreshIntervalMs?: string;
3323 };
3324
3325 /**
3326 * Statistics of materialized views considered in a query job.
3327 */
3328 type IMaterializedViewStatistics = {
3329 /**
3330 * Materialized views considered for the query job. Only certain materialized views are used. For a detailed list, see the child message. If many materialized views are considered, then the list might be incomplete.
3331 */
3332 materializedView?: Array<IMaterializedView>;
3333 };
3334
3335 /**
3336 * Status of a materialized view. The last refresh timestamp status is omitted here, but is present in the MaterializedViewDefinition message.
3337 */
3338 type IMaterializedViewStatus = {
3339 /**
3340 * Output only. Error result of the last automatic refresh. If present, indicates that the last automatic refresh was unsuccessful.
3341 */
3342 lastRefreshStatus?: IErrorProto;
3343 /**
3344 * Output only. Refresh watermark of materialized view. The base tables' data were collected into the materialized view cache until this time.
3345 */
3346 refreshWatermark?: string;
3347 };
3348
3349 /**
3350 * Statistics for metadata caching in BigLake tables.
3351 */
3352 type IMetadataCacheStatistics = {
3353 /**
3354 * Set for the Metadata caching eligible tables referenced in the query.
3355 */
3356 tableMetadataCacheUsage?: Array<ITableMetadataCacheUsage>;
3357 };
3358
3359 /**
3360 * Job statistics specific to a BigQuery ML training job.
3361 */
3362 type IMlStatistics = {
3363 /**
3364 * Output only. Trials of a [hyperparameter tuning job](https://cloud.google.com/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overview) sorted by trial_id.
3365 */
3366 hparamTrials?: Array<IHparamTuningTrial>;
3367 /**
3368 * Results for all completed iterations. Empty for [hyperparameter tuning jobs](https://cloud.google.com/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overview).
3369 */
3370 iterationResults?: Array<IIterationResult>;
3371 /**
3372 * Output only. 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.
3373 */
3374 maxIterations?: string;
3375 /**
3376 * Output only. The type of the model that is being trained.
3377 */
3378 modelType?:
3379 | 'MODEL_TYPE_UNSPECIFIED'
3380 | 'LINEAR_REGRESSION'
3381 | 'LOGISTIC_REGRESSION'
3382 | 'KMEANS'
3383 | 'MATRIX_FACTORIZATION'
3384 | 'DNN_CLASSIFIER'
3385 | 'TENSORFLOW'
3386 | 'DNN_REGRESSOR'
3387 | 'XGBOOST'
3388 | 'BOOSTED_TREE_REGRESSOR'
3389 | 'BOOSTED_TREE_CLASSIFIER'
3390 | 'ARIMA'
3391 | 'AUTOML_REGRESSOR'
3392 | 'AUTOML_CLASSIFIER'
3393 | 'PCA'
3394 | 'DNN_LINEAR_COMBINED_CLASSIFIER'
3395 | 'DNN_LINEAR_COMBINED_REGRESSOR'
3396 | 'AUTOENCODER'
3397 | 'ARIMA_PLUS'
3398 | 'ARIMA_PLUS_XREG'
3399 | 'RANDOM_FOREST_REGRESSOR'
3400 | 'RANDOM_FOREST_CLASSIFIER'
3401 | 'TENSORFLOW_LITE'
3402 | 'ONNX'
3403 | 'TRANSFORM_ONLY';
3404 /**
3405 * Output only. Training type of the job.
3406 */
3407 trainingType?:
3408 | 'TRAINING_TYPE_UNSPECIFIED'
3409 | 'SINGLE_TRAINING'
3410 | 'HPARAM_TUNING';
3411 };
3412
3413 type IModel = {
3414 /**
3415 * The best trial_id across all training runs.
3416 */
3417 bestTrialId?: string;
3418 /**
3419 * Output only. The time when this model was created, in millisecs since the epoch.
3420 */
3421 creationTime?: string;
3422 /**
3423 * Output only. The default trial_id to use in TVFs when the trial_id is not passed in. For single-objective [hyperparameter tuning](https://cloud.google.com/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overview) models, this is the best trial ID. For multi-objective [hyperparameter tuning](https://cloud.google.com/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overview) models, this is the smallest trial ID among all Pareto optimal trials.
3424 */
3425 defaultTrialId?: string;
3426 /**
3427 * Optional. A user-friendly description of this model.
3428 */
3429 description?: string;
3430 /**
3431 * 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.
3432 */
3433 encryptionConfiguration?: IEncryptionConfiguration;
3434 /**
3435 * Output only. A hash of this resource.
3436 */
3437 etag?: string;
3438 /**
3439 * 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.
3440 */
3441 expirationTime?: string;
3442 /**
3443 * Output only. Input feature columns for the model inference. If the model is trained with TRANSFORM clause, these are the input of the TRANSFORM clause.
3444 */
3445 featureColumns?: Array<IStandardSqlField>;
3446 /**
3447 * Optional. A descriptive name for this model.
3448 */
3449 friendlyName?: string;
3450 /**
3451 * Output only. All hyperparameter search spaces in this model.
3452 */
3453 hparamSearchSpaces?: IHparamSearchSpaces;
3454 /**
3455 * Output only. Trials of a [hyperparameter tuning](https://cloud.google.com/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overview) model sorted by trial_id.
3456 */
3457 hparamTrials?: Array<IHparamTuningTrial>;
3458 /**
3459 * Output only. Label columns that were used to train this model. The output of the model will have a "predicted_" prefix to these columns.
3460 */
3461 labelColumns?: Array<IStandardSqlField>;
3462 /**
3463 * 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.
3464 */
3465 labels?: {[key: string]: string};
3466 /**
3467 * Output only. The time when this model was last modified, in millisecs since the epoch.
3468 */
3469 lastModifiedTime?: string;
3470 /**
3471 * Output only. The geographic location where the model resides. This value is inherited from the dataset.
3472 */
3473 location?: string;
3474 /**
3475 * Required. Unique identifier for this model.
3476 */
3477 modelReference?: IModelReference;
3478 /**
3479 * Output only. Type of the model resource.
3480 */
3481 modelType?:
3482 | 'MODEL_TYPE_UNSPECIFIED'
3483 | 'LINEAR_REGRESSION'
3484 | 'LOGISTIC_REGRESSION'
3485 | 'KMEANS'
3486 | 'MATRIX_FACTORIZATION'
3487 | 'DNN_CLASSIFIER'
3488 | 'TENSORFLOW'
3489 | 'DNN_REGRESSOR'
3490 | 'XGBOOST'
3491 | 'BOOSTED_TREE_REGRESSOR'
3492 | 'BOOSTED_TREE_CLASSIFIER'
3493 | 'ARIMA'
3494 | 'AUTOML_REGRESSOR'
3495 | 'AUTOML_CLASSIFIER'
3496 | 'PCA'
3497 | 'DNN_LINEAR_COMBINED_CLASSIFIER'
3498 | 'DNN_LINEAR_COMBINED_REGRESSOR'
3499 | 'AUTOENCODER'
3500 | 'ARIMA_PLUS'
3501 | 'ARIMA_PLUS_XREG'
3502 | 'RANDOM_FOREST_REGRESSOR'
3503 | 'RANDOM_FOREST_CLASSIFIER'
3504 | 'TENSORFLOW_LITE'
3505 | 'ONNX'
3506 | 'TRANSFORM_ONLY';
3507 /**
3508 * Output only. For single-objective [hyperparameter tuning](https://cloud.google.com/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overview) models, it only contains the best trial. For multi-objective [hyperparameter tuning](https://cloud.google.com/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overview) models, it contains all Pareto optimal trials sorted by trial_id.
3509 */
3510 optimalTrialIds?: Array<string>;
3511 /**
3512 * Output only. Remote model info
3513 */
3514 remoteModelInfo?: IRemoteModelInfo;
3515 /**
3516 * Information for all training runs in increasing order of start_time.
3517 */
3518 trainingRuns?: Array<ITrainingRun>;
3519 /**
3520 * Output only. This field will be populated if a TRANSFORM clause was used to train a model. TRANSFORM clause (if used) takes feature_columns as input and outputs transform_columns. transform_columns then are used to train the model.
3521 */
3522 transformColumns?: Array<ITransformColumn>;
3523 };
3524
3525 type IModelDefinition = {
3526 /**
3527 * Deprecated.
3528 */
3529 modelOptions?: {
3530 labels?: Array<string>;
3531 lossType?: string;
3532 modelType?: string;
3533 };
3534 /**
3535 * Deprecated.
3536 */
3537 trainingRuns?: Array<IBqmlTrainingRun>;
3538 };
3539
3540 /**
3541 * Options related to model extraction.
3542 */
3543 type IModelExtractOptions = {
3544 /**
3545 * The 1-based ID of the trial to be exported from a hyperparameter tuning model. If not specified, the trial with id = [Model](https://cloud.google.com/bigquery/docs/reference/rest/v2/models#resource:-model).defaultTrialId is exported. This field is ignored for models not trained with hyperparameter tuning.
3546 */
3547 trialId?: string;
3548 };
3549
3550 /**
3551 * Id path of a model.
3552 */
3553 type IModelReference = {
3554 /**
3555 * Required. The ID of the dataset containing this model.
3556 */
3557 datasetId?: string;
3558 /**
3559 * 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.
3560 */
3561 modelId?: string;
3562 /**
3563 * Required. The ID of the project containing this model.
3564 */
3565 projectId?: string;
3566 };
3567
3568 /**
3569 * Evaluation metrics for multi-class classification/classifier models.
3570 */
3571 type IMultiClassClassificationMetrics = {
3572 /**
3573 * Aggregate classification metrics.
3574 */
3575 aggregateClassificationMetrics?: IAggregateClassificationMetrics;
3576 /**
3577 * Confusion matrix at different thresholds.
3578 */
3579 confusionMatrixList?: Array<IConfusionMatrix>;
3580 };
3581
3582 /**
3583 * Parquet Options for load and make external tables.
3584 */
3585 type IParquetOptions = {
3586 /**
3587 * Optional. Indicates whether to use schema inference specifically for Parquet LIST logical type.
3588 */
3589 enableListInference?: boolean;
3590 /**
3591 * Optional. Indicates whether to infer Parquet ENUM logical type as STRING instead of BYTES by default.
3592 */
3593 enumAsString?: boolean;
3594 /**
3595 * Optional. Indicates how to represent a Parquet map if present.
3596 */
3597 mapTargetType?: 'MAP_TARGET_TYPE_UNSPECIFIED' | 'ARRAY_OF_STRUCT';
3598 };
3599
3600 /**
3601 * Partition skew detailed information.
3602 */
3603 type IPartitionSkew = {
3604 /**
3605 * Output only. Source stages which produce skewed data.
3606 */
3607 skewSources?: Array<ISkewSource>;
3608 };
3609
3610 /**
3611 * The partitioning column information.
3612 */
3613 type IPartitionedColumn = {
3614 /**
3615 * Required. The name of the partition column.
3616 */
3617 field?: string;
3618 };
3619
3620 /**
3621 * The partitioning information, which includes managed table, external table and metastore partitioned table partition information.
3622 */
3623 type IPartitioningDefinition = {
3624 /**
3625 * Optional. Details about each partitioning column. This field is output only for all partitioning types other than metastore partitioned tables. BigQuery native tables only support 1 partitioning column. Other table types may support 0, 1 or more partitioning columns. For metastore partitioned tables, the order must match the definition order in the Hive Metastore, where it must match the physical layout of the table. For example, CREATE TABLE a_table(id BIGINT, name STRING) PARTITIONED BY (city STRING, state STRING). In this case the values must be ['city', 'state'] in that order.
3626 */
3627 partitionedColumn?: Array<IPartitionedColumn>;
3628 };
3629
3630 /**
3631 * Performance insights for the job.
3632 */
3633 type IPerformanceInsights = {
3634 /**
3635 * Output only. Average execution ms of previous runs. Indicates the job ran slow compared to previous executions. To find previous executions, use INFORMATION_SCHEMA tables and filter jobs with same query hash.
3636 */
3637 avgPreviousExecutionMs?: string;
3638 /**
3639 * Output only. Query stage performance insights compared to previous runs, for diagnosing performance regression.
3640 */
3641 stagePerformanceChangeInsights?: Array<IStagePerformanceChangeInsight>;
3642 /**
3643 * Output only. Standalone query stage performance insights, for exploring potential improvements.
3644 */
3645 stagePerformanceStandaloneInsights?: Array<IStagePerformanceStandaloneInsight>;
3646 };
3647
3648 /**
3649 * 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/).
3650 */
3651 type IPolicy = {
3652 /**
3653 * Specifies cloud audit logging configuration for this policy.
3654 */
3655 auditConfigs?: Array<IAuditConfig>;
3656 /**
3657 * 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`.
3658 */
3659 bindings?: Array<IBinding>;
3660 /**
3661 * `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.
3662 */
3663 etag?: string;
3664 /**
3665 * 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).
3666 */
3667 version?: number;
3668 };
3669
3670 /**
3671 * Principal component infos, used only for eigen decomposition based models, e.g., PCA. Ordered by explained_variance in the descending order.
3672 */
3673 type IPrincipalComponentInfo = {
3674 /**
3675 * The explained_variance is pre-ordered in the descending order to compute the cumulative explained variance ratio.
3676 */
3677 cumulativeExplainedVarianceRatio?: number;
3678 /**
3679 * Explained variance by this principal component, which is simply the eigenvalue.
3680 */
3681 explainedVariance?: number;
3682 /**
3683 * Explained_variance over the total explained variance.
3684 */
3685 explainedVarianceRatio?: number;
3686 /**
3687 * Id of the principal component.
3688 */
3689 principalComponentId?: string;
3690 };
3691
3692 /**
3693 * Represents privacy policy that contains the privacy requirements specified by the data owner. Currently, this is only supported on views.
3694 */
3695 type IPrivacyPolicy = {
3696 /**
3697 * Optional. Policy used for aggregation thresholds.
3698 */
3699 aggregationThresholdPolicy?: IAggregationThresholdPolicy;
3700 /**
3701 * Optional. Policy used for differential privacy.
3702 */
3703 differentialPrivacyPolicy?: IDifferentialPrivacyPolicy;
3704 /**
3705 * Optional. Join restriction policy is outside of the one of policies, since this policy can be set along with other policies. This policy gives data providers the ability to enforce joins on the 'join_allowed_columns' when data is queried from a privacy protected view.
3706 */
3707 joinRestrictionPolicy?: IJoinRestrictionPolicy;
3708 };
3709
3710 /**
3711 * Response object of ListProjects
3712 */
3713 type IProjectList = {
3714 /**
3715 * A hash of the page of results.
3716 */
3717 etag?: string;
3718 /**
3719 * The resource type of the response.
3720 */
3721 kind?: string;
3722 /**
3723 * Use this token to request the next page of results.
3724 */
3725 nextPageToken?: string;
3726 /**
3727 * Projects to which the user has at least READ access.
3728 */
3729 projects?: Array<{
3730 /**
3731 * A descriptive name for this project. A wrapper is used here because friendlyName can be set to the empty string.
3732 */
3733 friendlyName?: string;
3734 /**
3735 * An opaque ID of this project.
3736 */
3737 id?: string;
3738 /**
3739 * The resource type.
3740 */
3741 kind?: string;
3742 /**
3743 * The numeric ID of this project.
3744 */
3745 numericId?: string;
3746 /**
3747 * A unique reference to this project.
3748 */
3749 projectReference?: IProjectReference;
3750 }>;
3751 /**
3752 * The total number of projects in the page. A wrapper is used here because the field should still be in the response when the value is 0.
3753 */
3754 totalItems?: number;
3755 };
3756
3757 /**
3758 * A unique reference to a project.
3759 */
3760 type IProjectReference = {
3761 /**
3762 * Required. ID of the project. Can be either the numeric ID or the assigned ID of the project.
3763 */
3764 projectId?: string;
3765 };
3766
3767 /**
3768 * Query optimization information for a QUERY job.
3769 */
3770 type IQueryInfo = {
3771 /**
3772 * Output only. Information about query optimizations.
3773 */
3774 optimizationDetails?: {[key: string]: any};
3775 };
3776
3777 /**
3778 * A parameter given to a query.
3779 */
3780 type IQueryParameter = {
3781 /**
3782 * Optional. If unset, this is a positional parameter. Otherwise, should be unique within a query.
3783 */
3784 name?: string;
3785 /**
3786 * Required. The type of this parameter.
3787 */
3788 parameterType?: IQueryParameterType;
3789 /**
3790 * Required. The value of this parameter.
3791 */
3792 parameterValue?: IQueryParameterValue;
3793 };
3794
3795 /**
3796 * The type of a query parameter.
3797 */
3798 type IQueryParameterType = {
3799 /**
3800 * Optional. The type of the array's elements, if this is an array.
3801 */
3802 arrayType?: IQueryParameterType;
3803 /**
3804 * Optional. The element type of the range, if this is a range.
3805 */
3806 rangeElementType?: IQueryParameterType;
3807 /**
3808 * Optional. The types of the fields of this struct, in order, if this is a struct.
3809 */
3810 structTypes?: Array<{
3811 /**
3812 * Optional. Human-oriented description of the field.
3813 */
3814 description?: string;
3815 /**
3816 * Optional. The name of this field.
3817 */
3818 name?: string;
3819 /**
3820 * Required. The type of this field.
3821 */
3822 type?: IQueryParameterType;
3823 }>;
3824 /**
3825 * Required. The top level type of this field.
3826 */
3827 type?: string;
3828 };
3829
3830 /**
3831 * The value of a query parameter.
3832 */
3833 type IQueryParameterValue = {
3834 /**
3835 * Optional. The array values, if this is an array type.
3836 */
3837 arrayValues?: Array<IQueryParameterValue>;
3838 /**
3839 * Optional. The range value, if this is a range type.
3840 */
3841 rangeValue?: IRangeValue;
3842 /**
3843 * The struct field values.
3844 */
3845 structValues?: {[key: string]: IQueryParameterValue};
3846 /**
3847 * Optional. The value of this value, if a simple scalar type.
3848 */
3849 value?: string;
3850 };
3851
3852 /**
3853 * Describes the format of the jobs.query request.
3854 */
3855 type IQueryRequest = {
3856 /**
3857 * Optional. Connection properties which can modify the query behavior.
3858 */
3859 connectionProperties?: Array<IConnectionProperty>;
3860 /**
3861 * [Optional] Specifies whether the query should be executed as a continuous query. The default value is false.
3862 */
3863 continuous?: boolean;
3864 /**
3865 * Optional. If true, creates a new session using a randomly generated session_id. If false, runs query with an existing session_id passed in ConnectionProperty, otherwise runs query in non-session mode. The session location will be set to QueryRequest.location if it is present, otherwise it's set to the default location based on existing routing logic.
3866 */
3867 createSession?: boolean;
3868 /**
3869 * 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'.
3870 */
3871 defaultDataset?: IDatasetReference;
3872 /**
3873 * 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.
3874 */
3875 dryRun?: boolean;
3876 /**
3877 * Optional. Output format adjustments.
3878 */
3879 formatOptions?: IDataFormatOptions;
3880 /**
3881 * Optional. If not set, jobs are always required. If set, the query request will follow the behavior described JobCreationMode. [Preview](https://cloud.google.com/products/#product-launch-stages)
3882 */
3883 jobCreationMode?:
3884 | 'JOB_CREATION_MODE_UNSPECIFIED'
3885 | 'JOB_CREATION_REQUIRED'
3886 | 'JOB_CREATION_OPTIONAL';
3887 /**
3888 * The resource type of the request.
3889 */
3890 kind?: string;
3891 /**
3892 * Optional. The labels associated with this query. Labels can be used to organize and group query 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 keys must start with a letter and each label in the list must have a different key.
3893 */
3894 labels?: {[key: string]: string};
3895 /**
3896 * The geographic location where the job should run. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location.
3897 */
3898 location?: string;
3899 /**
3900 * 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.
3901 */
3902 maxResults?: number;
3903 /**
3904 * Optional. Limits the bytes billed for this query. Queries with bytes billed above this limit will fail (without incurring a charge). If unspecified, the project default is used.
3905 */
3906 maximumBytesBilled?: string;
3907 /**
3908 * GoogleSQL only. Set to POSITIONAL to use positional (?) query parameters or to NAMED to use named (@myparam) query parameters in this query.
3909 */
3910 parameterMode?: string;
3911 /**
3912 * This property is deprecated.
3913 */
3914 preserveNulls?: boolean;
3915 /**
3916 * Required. A query string to execute, using Google Standard SQL or legacy SQL syntax. Example: "SELECT COUNT(f1) FROM myProjectId.myDatasetId.myTableId".
3917 */
3918 query?: string;
3919 /**
3920 * Query parameters for GoogleSQL queries.
3921 */
3922 queryParameters?: Array<IQueryParameter>;
3923 /**
3924 * Optional. 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 another request, all parameters in the request that may affect the result 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.
3925 */
3926 requestId?: string;
3927 /**
3928 * Optional. Optional: Specifies the maximum amount of time, in milliseconds, that the client is willing to wait for the query to complete. By default, this limit is 10 seconds (10,000 milliseconds). If the query is complete, the jobComplete field in the response is true. If the query has not yet completed, jobComplete is false. You can request a longer timeout period in the timeoutMs field. However, the call is not guaranteed to wait for the specified timeout; it typically returns after around 200 seconds (200,000 milliseconds), even if the query is not complete. If jobComplete is false, you can continue to wait for the query to complete by calling the getQueryResults method until the jobComplete field in the getQueryResults response is true.
3929 */
3930 timeoutMs?: number;
3931 /**
3932 * 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 GoogleSQL: 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.
3933 */
3934 useLegacySql?: boolean;
3935 /**
3936 * 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.
3937 */
3938 useQueryCache?: boolean;
3939 };
3940
3941 type IQueryResponse = {
3942 /**
3943 * Whether the query result was fetched from the query cache.
3944 */
3945 cacheHit?: boolean;
3946 /**
3947 * Output only. Detailed statistics for DML statements INSERT, UPDATE, DELETE, MERGE or TRUNCATE.
3948 */
3949 dmlStats?: IDmlStatistics;
3950 /**
3951 * 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. For more information about error messages, see [Error messages](https://cloud.google.com/bigquery/docs/error-messages).
3952 */
3953 errors?: Array<IErrorProto>;
3954 /**
3955 * 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.
3956 */
3957 jobComplete?: boolean;
3958 /**
3959 * Optional. The reason why a Job was created. Only relevant when a job_reference is present in the response. If job_reference is not present it will always be unset. [Preview](https://cloud.google.com/products/#product-launch-stages)
3960 */
3961 jobCreationReason?: IJobCreationReason;
3962 /**
3963 * 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). If job_creation_mode was set to `JOB_CREATION_OPTIONAL` and the query completes without creating a job, this field will be empty.
3964 */
3965 jobReference?: IJobReference;
3966 /**
3967 * The resource type.
3968 */
3969 kind?: string;
3970 /**
3971 * Output only. The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE.
3972 */
3973 numDmlAffectedRows?: string;
3974 /**
3975 * A token used for paging results. A non-empty token indicates that additional results are available. To see additional results, query the [`jobs.getQueryResults`](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/getQueryResults) method. For more information, see [Paging through table data](https://cloud.google.com/bigquery/docs/paging-results).
3976 */
3977 pageToken?: string;
3978 /**
3979 * Auto-generated ID for the query. [Preview](https://cloud.google.com/products/#product-launch-stages)
3980 */
3981 queryId?: string;
3982 /**
3983 * 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.
3984 */
3985 rows?: Array<ITableRow>;
3986 /**
3987 * The schema of the results. Present only when the query completes successfully.
3988 */
3989 schema?: ITableSchema;
3990 /**
3991 * Output only. Information of the session if this job is part of one.
3992 */
3993 sessionInfo?: ISessionInfo;
3994 /**
3995 * 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.
3996 */
3997 totalBytesProcessed?: string;
3998 /**
3999 * 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.
4000 */
4001 totalRows?: string;
4002 };
4003
4004 /**
4005 * Summary of the state of query execution at a given time.
4006 */
4007 type IQueryTimelineSample = {
4008 /**
4009 * Total number of active workers. This does not correspond directly to slot usage. This is the largest value observed since the last sample.
4010 */
4011 activeUnits?: string;
4012 /**
4013 * Total parallel units of work completed by this query.
4014 */
4015 completedUnits?: string;
4016 /**
4017 * Milliseconds elapsed since the start of query execution.
4018 */
4019 elapsedMs?: string;
4020 /**
4021 * Units of work that can be scheduled immediately. Providing additional slots for these units of work will accelerate the query, if no other query in the reservation needs additional slots.
4022 */
4023 estimatedRunnableUnits?: string;
4024 /**
4025 * Total units of work remaining for the query. This number can be revised (increased or decreased) while the query is running.
4026 */
4027 pendingUnits?: string;
4028 /**
4029 * Cumulative slot-ms consumed by the query.
4030 */
4031 totalSlotMs?: string;
4032 };
4033
4034 type IRangePartitioning = {
4035 /**
4036 * Required. The name of the column to partition the table on. It must be a top-level, INT64 column whose mode is NULLABLE or REQUIRED.
4037 */
4038 field?: string;
4039 /**
4040 * [Experimental] Defines the ranges for range partitioning.
4041 */
4042 range?: {
4043 /**
4044 * [Experimental] The end of range partitioning, exclusive.
4045 */
4046 end?: string;
4047 /**
4048 * [Experimental] The width of each interval.
4049 */
4050 interval?: string;
4051 /**
4052 * [Experimental] The start of range partitioning, inclusive.
4053 */
4054 start?: string;
4055 };
4056 };
4057
4058 /**
4059 * Represents the value of a range.
4060 */
4061 type IRangeValue = {
4062 /**
4063 * Optional. The end value of the range. A missing value represents an unbounded end.
4064 */
4065 end?: IQueryParameterValue;
4066 /**
4067 * Optional. The start value of the range. A missing value represents an unbounded start.
4068 */
4069 start?: IQueryParameterValue;
4070 };
4071
4072 /**
4073 * Evaluation metrics used by weighted-ALS models specified by feedback_type=implicit.
4074 */
4075 type IRankingMetrics = {
4076 /**
4077 * Determines the goodness of a ranking by computing the percentile rank from the predicted confidence and dividing it by the original rank.
4078 */
4079 averageRank?: number;
4080 /**
4081 * Calculates a precision per user for all the items by ranking them and then averages all the precisions across all the users.
4082 */
4083 meanAveragePrecision?: number;
4084 /**
4085 * 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.
4086 */
4087 meanSquaredError?: number;
4088 /**
4089 * 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.
4090 */
4091 normalizedDiscountedCumulativeGain?: number;
4092 };
4093
4094 /**
4095 * Evaluation metrics for regression and explicit feedback type matrix factorization models.
4096 */
4097 type IRegressionMetrics = {
4098 /**
4099 * Mean absolute error.
4100 */
4101 meanAbsoluteError?: number;
4102 /**
4103 * Mean squared error.
4104 */
4105 meanSquaredError?: number;
4106 /**
4107 * Mean squared log error.
4108 */
4109 meanSquaredLogError?: number;
4110 /**
4111 * Median absolute error.
4112 */
4113 medianAbsoluteError?: number;
4114 /**
4115 * R^2 score. This corresponds to r2_score in ML.EVALUATE.
4116 */
4117 rSquared?: number;
4118 };
4119
4120 /**
4121 * Options for a remote user-defined function.
4122 */
4123 type IRemoteFunctionOptions = {
4124 /**
4125 * Fully qualified name of the user-provided connection object which holds the authentication information to send requests to the remote service. Format: ```"projects/{projectId}/locations/{locationId}/connections/{connectionId}"```
4126 */
4127 connection?: string;
4128 /**
4129 * Endpoint of the user-provided remote service, e.g. ```https://us-east1-my_gcf_project.cloudfunctions.net/remote_add```
4130 */
4131 endpoint?: string;
4132 /**
4133 * Max number of rows in each batch sent to the remote service. If absent or if 0, BigQuery dynamically decides the number of rows in a batch.
4134 */
4135 maxBatchingRows?: string;
4136 /**
4137 * User-defined context as a set of key/value pairs, which will be sent as function invocation context together with batched arguments in the requests to the remote service. The total number of bytes of keys and values must be less than 8KB.
4138 */
4139 userDefinedContext?: {[key: string]: string};
4140 };
4141
4142 /**
4143 * Remote Model Info
4144 */
4145 type IRemoteModelInfo = {
4146 /**
4147 * Output only. Fully qualified name of the user-provided connection object of the remote model. Format: ```"projects/{project_id}/locations/{location_id}/connections/{connection_id}"```
4148 */
4149 connection?: string;
4150 /**
4151 * Output only. The endpoint for remote model.
4152 */
4153 endpoint?: string;
4154 /**
4155 * Output only. Max number of rows in each batch sent to the remote service. If unset, the number of rows in each batch is set dynamically.
4156 */
4157 maxBatchingRows?: string;
4158 /**
4159 * Output only. The model version for LLM.
4160 */
4161 remoteModelVersion?: string;
4162 /**
4163 * Output only. The remote service type for remote model.
4164 */
4165 remoteServiceType?:
4166 | 'REMOTE_SERVICE_TYPE_UNSPECIFIED'
4167 | 'CLOUD_AI_TRANSLATE_V3'
4168 | 'CLOUD_AI_VISION_V1'
4169 | 'CLOUD_AI_NATURAL_LANGUAGE_V1'
4170 | 'CLOUD_AI_SPEECH_TO_TEXT_V2';
4171 /**
4172 * Output only. The name of the speech recognizer to use for speech recognition. The expected format is `projects/{project}/locations/{location}/recognizers/{recognizer}`. Customers can specify this field at model creation. If not specified, a default recognizer `projects/{model project}/locations/global/recognizers/_` will be used. See more details at [recognizers](https://cloud.google.com/speech-to-text/v2/docs/reference/rest/v2/projects.locations.recognizers)
4173 */
4174 speechRecognizer?: string;
4175 };
4176
4177 type IRestrictionConfig = {
4178 /**
4179 * Output only. Specifies the type of dataset/table restriction.
4180 */
4181 type?: 'RESTRICTION_TYPE_UNSPECIFIED' | 'RESTRICTED_DATA_EGRESS';
4182 };
4183
4184 /**
4185 * A user-defined function or a stored procedure.
4186 */
4187 type IRoutine = {
4188 /**
4189 * Optional.
4190 */
4191 arguments?: Array<IArgument>;
4192 /**
4193 * Output only. The time when this routine was created, in milliseconds since the epoch.
4194 */
4195 creationTime?: string;
4196 /**
4197 * Optional. If set to `DATA_MASKING`, the function is validated and made available as a masking function. For more information, see [Create custom masking routines](https://cloud.google.com/bigquery/docs/user-defined-functions#custom-mask).
4198 */
4199 dataGovernanceType?: 'DATA_GOVERNANCE_TYPE_UNSPECIFIED' | 'DATA_MASKING';
4200 /**
4201 * 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.
4202 */
4203 definitionBody?: string;
4204 /**
4205 * Optional. The description of the routine, if defined.
4206 */
4207 description?: string;
4208 /**
4209 * Optional. The determinism level of the JavaScript UDF, if defined.
4210 */
4211 determinismLevel?:
4212 | 'DETERMINISM_LEVEL_UNSPECIFIED'
4213 | 'DETERMINISTIC'
4214 | 'NOT_DETERMINISTIC';
4215 /**
4216 * Output only. A hash of this resource.
4217 */
4218 etag?: string;
4219 /**
4220 * Optional. If language = "JAVASCRIPT", this field stores the path of the imported JAVASCRIPT libraries.
4221 */
4222 importedLibraries?: Array<string>;
4223 /**
4224 * Optional. Defaults to "SQL" if remote_function_options field is absent, not set otherwise.
4225 */
4226 language?:
4227 | 'LANGUAGE_UNSPECIFIED'
4228 | 'SQL'
4229 | 'JAVASCRIPT'
4230 | 'PYTHON'
4231 | 'JAVA'
4232 | 'SCALA';
4233 /**
4234 * Output only. The time when this routine was last modified, in milliseconds since the epoch.
4235 */
4236 lastModifiedTime?: string;
4237 /**
4238 * Optional. Remote function specific options.
4239 */
4240 remoteFunctionOptions?: IRemoteFunctionOptions;
4241 /**
4242 * 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 specified in return table type, at query time.
4243 */
4244 returnTableType?: IStandardSqlTableType;
4245 /**
4246 * 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.
4247 */
4248 returnType?: IStandardSqlDataType;
4249 /**
4250 * Required. Reference describing the ID of this routine.
4251 */
4252 routineReference?: IRoutineReference;
4253 /**
4254 * Required. The type of routine.
4255 */
4256 routineType?:
4257 | 'ROUTINE_TYPE_UNSPECIFIED'
4258 | 'SCALAR_FUNCTION'
4259 | 'PROCEDURE'
4260 | 'TABLE_VALUED_FUNCTION'
4261 | 'AGGREGATE_FUNCTION';
4262 /**
4263 * Optional. The security mode of the routine, if defined. If not defined, the security mode is automatically determined from the routine's configuration.
4264 */
4265 securityMode?: 'SECURITY_MODE_UNSPECIFIED' | 'DEFINER' | 'INVOKER';
4266 /**
4267 * Optional. Spark specific options.
4268 */
4269 sparkOptions?: ISparkOptions;
4270 /**
4271 * Optional. Use this option to catch many common errors. Error checking is not exhaustive, and successfully creating a procedure doesn't guarantee that the procedure will successfully execute at runtime. If `strictMode` is set to `TRUE`, the procedure body is further checked for errors such as non-existent tables or columns. The `CREATE PROCEDURE` statement fails if the body fails any of these checks. If `strictMode` is set to `FALSE`, the procedure body is checked only for syntax. For procedures that invoke themselves recursively, specify `strictMode=FALSE` to avoid non-existent procedure errors during validation. Default value is `TRUE`.
4272 */
4273 strictMode?: boolean;
4274 };
4275
4276 /**
4277 * Id path of a routine.
4278 */
4279 type IRoutineReference = {
4280 /**
4281 * Required. The ID of the dataset containing this routine.
4282 */
4283 datasetId?: string;
4284 /**
4285 * Required. The ID of the project containing this routine.
4286 */
4287 projectId?: string;
4288 /**
4289 * 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.
4290 */
4291 routineId?: string;
4292 };
4293
4294 /**
4295 * A single row in the confusion matrix.
4296 */
4297 type IRow = {
4298 /**
4299 * The original label of this row.
4300 */
4301 actualLabel?: string;
4302 /**
4303 * Info describing predicted label distribution.
4304 */
4305 entries?: Array<IEntry>;
4306 };
4307
4308 /**
4309 * 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.
4310 */
4311 type IRowAccessPolicy = {
4312 /**
4313 * Output only. The time when this row access policy was created, in milliseconds since the epoch.
4314 */
4315 creationTime?: string;
4316 /**
4317 * Output only. A hash of this resource.
4318 */
4319 etag?: string;
4320 /**
4321 * 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
4322 */
4323 filterPredicate?: string;
4324 /**
4325 * Output only. The time when this row access policy was last modified, in milliseconds since the epoch.
4326 */
4327 lastModifiedTime?: string;
4328 /**
4329 * Required. Reference describing the ID of this row access policy.
4330 */
4331 rowAccessPolicyReference?: IRowAccessPolicyReference;
4332 };
4333
4334 /**
4335 * Id path of a row access policy.
4336 */
4337 type IRowAccessPolicyReference = {
4338 /**
4339 * Required. The ID of the dataset containing this row access policy.
4340 */
4341 datasetId?: string;
4342 /**
4343 * 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.
4344 */
4345 policyId?: string;
4346 /**
4347 * Required. The ID of the project containing this row access policy.
4348 */
4349 projectId?: string;
4350 /**
4351 * Required. The ID of the table containing this row access policy.
4352 */
4353 tableId?: string;
4354 };
4355
4356 /**
4357 * Statistics for row-level security.
4358 */
4359 type IRowLevelSecurityStatistics = {
4360 /**
4361 * Whether any accessed data was protected by row access policies.
4362 */
4363 rowLevelSecurityApplied?: boolean;
4364 };
4365
4366 /**
4367 * Options related to script execution.
4368 */
4369 type IScriptOptions = {
4370 /**
4371 * Determines which statement in the script represents the "key result", used to populate the schema and query results of the script job. Default is LAST.
4372 */
4373 keyResultStatement?:
4374 | 'KEY_RESULT_STATEMENT_KIND_UNSPECIFIED'
4375 | 'LAST'
4376 | 'FIRST_SELECT';
4377 /**
4378 * Limit on the number of bytes billed per statement. Exceeding this budget results in an error.
4379 */
4380 statementByteBudget?: string;
4381 /**
4382 * Timeout period for each statement in a script.
4383 */
4384 statementTimeoutMs?: string;
4385 };
4386
4387 /**
4388 * Represents the location of the statement/expression being evaluated. Line and column numbers are defined as follows: - Line and column numbers start with one. That is, line 1 column 1 denotes the start of the script. - When inside a stored procedure, all line/column numbers are relative to the procedure body, not the script in which the procedure was defined. - Start/end positions exclude leading/trailing comments and whitespace. The end position always ends with a ";", when present. - Multi-byte Unicode characters are treated as just one column. - If the original script (or procedure definition) contains TAB characters, a tab "snaps" the indentation forward to the nearest multiple of 8 characters, plus 1. For example, a TAB on column 1, 2, 3, 4, 5, 6 , or 8 will advance the next character to column 9. A TAB on column 9, 10, 11, 12, 13, 14, 15, or 16 will advance the next character to column 17.
4389 */
4390 type IScriptStackFrame = {
4391 /**
4392 * Output only. One-based end column.
4393 */
4394 endColumn?: number;
4395 /**
4396 * Output only. One-based end line.
4397 */
4398 endLine?: number;
4399 /**
4400 * Output only. Name of the active procedure, empty if in a top-level script.
4401 */
4402 procedureId?: string;
4403 /**
4404 * Output only. One-based start column.
4405 */
4406 startColumn?: number;
4407 /**
4408 * Output only. One-based start line.
4409 */
4410 startLine?: number;
4411 /**
4412 * Output only. Text of the current statement/expression.
4413 */
4414 text?: string;
4415 };
4416
4417 /**
4418 * Job statistics specific to the child job of a script.
4419 */
4420 type IScriptStatistics = {
4421 /**
4422 * Whether this child job was a statement or expression.
4423 */
4424 evaluationKind?: 'EVALUATION_KIND_UNSPECIFIED' | 'STATEMENT' | 'EXPRESSION';
4425 /**
4426 * 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.
4427 */
4428 stackFrames?: Array<IScriptStackFrame>;
4429 };
4430
4431 /**
4432 * Statistics for a search query. Populated as part of JobStatistics2.
4433 */
4434 type ISearchStatistics = {
4435 /**
4436 * When `indexUsageMode` is `UNUSED` or `PARTIALLY_USED`, this field explains why indexes were not used in all or part of the search query. If `indexUsageMode` is `FULLY_USED`, this field is not populated.
4437 */
4438 indexUnusedReasons?: Array<IIndexUnusedReason>;
4439 /**
4440 * Specifies the index usage mode for the query.
4441 */
4442 indexUsageMode?:
4443 | 'INDEX_USAGE_MODE_UNSPECIFIED'
4444 | 'UNUSED'
4445 | 'PARTIALLY_USED'
4446 | 'FULLY_USED';
4447 };
4448
4449 /**
4450 * Serializer and deserializer information.
4451 */
4452 type ISerDeInfo = {
4453 /**
4454 * Optional. Name of the SerDe. The maximum length is 256 characters.
4455 */
4456 name?: string;
4457 /**
4458 * Optional. Key-value pairs that define the initialization parameters for the serialization library. Maximum size 10 Kib.
4459 */
4460 parameters?: {[key: string]: string};
4461 /**
4462 * Required. Specifies a fully-qualified class name of the serialization library that is responsible for the translation of data between table representation and the underlying low-level input and output format structures. The maximum length is 256 characters.
4463 */
4464 serializationLibrary?: string;
4465 };
4466
4467 /**
4468 * [Preview] Information related to sessions.
4469 */
4470 type ISessionInfo = {
4471 /**
4472 * Output only. The id of the session.
4473 */
4474 sessionId?: string;
4475 };
4476
4477 /**
4478 * Request message for `SetIamPolicy` method.
4479 */
4480 type ISetIamPolicyRequest = {
4481 /**
4482 * 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 Google Cloud services (such as Projects) might reject them.
4483 */
4484 policy?: IPolicy;
4485 /**
4486 * 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"`
4487 */
4488 updateMask?: string;
4489 };
4490
4491 /**
4492 * Details about source stages which produce skewed data.
4493 */
4494 type ISkewSource = {
4495 /**
4496 * Output only. Stage id of the skew source stage.
4497 */
4498 stageId?: string;
4499 };
4500
4501 /**
4502 * Information about base table and snapshot time of the snapshot.
4503 */
4504 type ISnapshotDefinition = {
4505 /**
4506 * Required. Reference describing the ID of the table that was snapshot.
4507 */
4508 baseTableReference?: ITableReference;
4509 /**
4510 * Required. The time at which the base table was snapshot. This value is reported in the JSON response using RFC3339 format.
4511 */
4512 snapshotTime?: string;
4513 };
4514
4515 /**
4516 * Spark job logs can be filtered by these fields in Cloud Logging.
4517 */
4518 type ISparkLoggingInfo = {
4519 /**
4520 * Output only. Project ID where the Spark logs were written.
4521 */
4522 projectId?: string;
4523 /**
4524 * Output only. Resource type used for logging.
4525 */
4526 resourceType?: string;
4527 };
4528
4529 /**
4530 * Options for a user-defined Spark routine.
4531 */
4532 type ISparkOptions = {
4533 /**
4534 * Archive files to be extracted into the working directory of each executor. For more information about Apache Spark, see [Apache Spark](https://spark.apache.org/docs/latest/index.html).
4535 */
4536 archiveUris?: Array<string>;
4537 /**
4538 * Fully qualified name of the user-provided Spark connection object. Format: ```"projects/{project_id}/locations/{location_id}/connections/{connection_id}"```
4539 */
4540 connection?: string;
4541 /**
4542 * Custom container image for the runtime environment.
4543 */
4544 containerImage?: string;
4545 /**
4546 * Files to be placed in the working directory of each executor. For more information about Apache Spark, see [Apache Spark](https://spark.apache.org/docs/latest/index.html).
4547 */
4548 fileUris?: Array<string>;
4549 /**
4550 * JARs to include on the driver and executor CLASSPATH. For more information about Apache Spark, see [Apache Spark](https://spark.apache.org/docs/latest/index.html).
4551 */
4552 jarUris?: Array<string>;
4553 /**
4554 * The fully qualified name of a class in jar_uris, for example, com.example.wordcount. Exactly one of main_class and main_jar_uri field should be set for Java/Scala language type.
4555 */
4556 mainClass?: string;
4557 /**
4558 * The main file/jar URI of the Spark application. Exactly one of the definition_body field and the main_file_uri field must be set for Python. Exactly one of main_class and main_file_uri field should be set for Java/Scala language type.
4559 */
4560 mainFileUri?: string;
4561 /**
4562 * Configuration properties as a set of key/value pairs, which will be passed on to the Spark application. For more information, see [Apache Spark](https://spark.apache.org/docs/latest/index.html) and the [procedure option list](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#procedure_option_list).
4563 */
4564 properties?: {[key: string]: string};
4565 /**
4566 * Python files to be placed on the PYTHONPATH for PySpark application. Supported file types: `.py`, `.egg`, and `.zip`. For more information about Apache Spark, see [Apache Spark](https://spark.apache.org/docs/latest/index.html).
4567 */
4568 pyFileUris?: Array<string>;
4569 /**
4570 * Runtime version. If not specified, the default runtime version is used.
4571 */
4572 runtimeVersion?: string;
4573 };
4574
4575 /**
4576 * Statistics for a BigSpark query. Populated as part of JobStatistics2
4577 */
4578 type ISparkStatistics = {
4579 /**
4580 * Output only. Endpoints returned from Dataproc. Key list: - history_server_endpoint: A link to Spark job UI.
4581 */
4582 endpoints?: {[key: string]: string};
4583 /**
4584 * Output only. The Google Cloud Storage bucket that is used as the default file system by the Spark application. This field is only filled when the Spark procedure uses the invoker security mode. The `gcsStagingBucket` bucket is inferred from the `@@spark_proc_properties.staging_bucket` system variable (if it is provided). Otherwise, BigQuery creates a default staging bucket for the job and returns the bucket name in this field. Example: * `gs://[bucket_name]`
4585 */
4586 gcsStagingBucket?: string;
4587 /**
4588 * Output only. The Cloud KMS encryption key that is used to protect the resources created by the Spark job. If the Spark procedure uses the invoker security mode, the Cloud KMS encryption key is either inferred from the provided system variable, `@@spark_proc_properties.kms_key_name`, or the default key of the BigQuery job's project (if the CMEK organization policy is enforced). Otherwise, the Cloud KMS key is either inferred from the Spark connection associated with the procedure (if it is provided), or from the default key of the Spark connection's project if the CMEK organization policy is enforced. Example: * `projects/[kms_project_id]/locations/[region]/keyRings/[key_region]/cryptoKeys/[key]`
4589 */
4590 kmsKeyName?: string;
4591 /**
4592 * Output only. Logging info is used to generate a link to Cloud Logging.
4593 */
4594 loggingInfo?: ISparkLoggingInfo;
4595 /**
4596 * Output only. Spark job ID if a Spark job is created successfully.
4597 */
4598 sparkJobId?: string;
4599 /**
4600 * Output only. Location where the Spark job is executed. A location is selected by BigQueury for jobs configured to run in a multi-region.
4601 */
4602 sparkJobLocation?: string;
4603 };
4604
4605 /**
4606 * Performance insights compared to the previous executions for a specific stage.
4607 */
4608 type IStagePerformanceChangeInsight = {
4609 /**
4610 * Output only. Input data change insight of the query stage.
4611 */
4612 inputDataChange?: IInputDataChange;
4613 /**
4614 * Output only. The stage id that the insight mapped to.
4615 */
4616 stageId?: string;
4617 };
4618
4619 /**
4620 * Standalone performance insights for a specific stage.
4621 */
4622 type IStagePerformanceStandaloneInsight = {
4623 /**
4624 * Output only. If present, the stage had the following reasons for being disqualified from BI Engine execution.
4625 */
4626 biEngineReasons?: Array<IBiEngineReason>;
4627 /**
4628 * Output only. High cardinality joins in the stage.
4629 */
4630 highCardinalityJoins?: Array<IHighCardinalityJoin>;
4631 /**
4632 * Output only. True if the stage has insufficient shuffle quota.
4633 */
4634 insufficientShuffleQuota?: boolean;
4635 /**
4636 * Output only. Partition skew in the stage.
4637 */
4638 partitionSkew?: IPartitionSkew;
4639 /**
4640 * Output only. True if the stage has a slot contention issue.
4641 */
4642 slotContention?: boolean;
4643 /**
4644 * Output only. The stage id that the insight mapped to.
4645 */
4646 stageId?: string;
4647 };
4648
4649 /**
4650 * The data type of a variable such as a function argument. Examples include: * INT64: `{"typeKind": "INT64"}` * ARRAY: { "typeKind": "ARRAY", "arrayElementType": {"typeKind": "STRING"} } * STRUCT>: { "typeKind": "STRUCT", "structType": { "fields": [ { "name": "x", "type": {"typeKind": "STRING"} }, { "name": "y", "type": { "typeKind": "ARRAY", "arrayElementType": {"typeKind": "DATE"} } } ] } } * RANGE: { "typeKind": "RANGE", "rangeElementType": {"typeKind": "DATE"} }
4651 */
4652 type IStandardSqlDataType = {
4653 /**
4654 * The type of the array's elements, if type_kind = "ARRAY".
4655 */
4656 arrayElementType?: IStandardSqlDataType;
4657 /**
4658 * The type of the range's elements, if type_kind = "RANGE".
4659 */
4660 rangeElementType?: IStandardSqlDataType;
4661 /**
4662 * The fields of this struct, in order, if type_kind = "STRUCT".
4663 */
4664 structType?: IStandardSqlStructType;
4665 /**
4666 * Required. The top level type of this field. Can be any GoogleSQL data type (e.g., "INT64", "DATE", "ARRAY").
4667 */
4668 typeKind?:
4669 | 'TYPE_KIND_UNSPECIFIED'
4670 | 'INT64'
4671 | 'BOOL'
4672 | 'FLOAT64'
4673 | 'STRING'
4674 | 'BYTES'
4675 | 'TIMESTAMP'
4676 | 'DATE'
4677 | 'TIME'
4678 | 'DATETIME'
4679 | 'INTERVAL'
4680 | 'GEOGRAPHY'
4681 | 'NUMERIC'
4682 | 'BIGNUMERIC'
4683 | 'JSON'
4684 | 'ARRAY'
4685 | 'STRUCT'
4686 | 'RANGE';
4687 };
4688
4689 /**
4690 * A field or a column.
4691 */
4692 type IStandardSqlField = {
4693 /**
4694 * Optional. The name of this field. Can be absent for struct fields.
4695 */
4696 name?: string;
4697 /**
4698 * 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).
4699 */
4700 type?: IStandardSqlDataType;
4701 };
4702
4703 /**
4704 * The representation of a SQL STRUCT type.
4705 */
4706 type IStandardSqlStructType = {
4707 /**
4708 * Fields within the struct.
4709 */
4710 fields?: Array<IStandardSqlField>;
4711 };
4712
4713 /**
4714 * A table type
4715 */
4716 type IStandardSqlTableType = {
4717 /**
4718 * The columns in this table type
4719 */
4720 columns?: Array<IStandardSqlField>;
4721 };
4722
4723 /**
4724 * Contains information about how a table's data is stored and accessed by open source query engines.
4725 */
4726 type IStorageDescriptor = {
4727 /**
4728 * Optional. Specifies the fully qualified class name of the InputFormat (e.g. "org.apache.hadoop.hive.ql.io.orc.OrcInputFormat"). The maximum length is 128 characters.
4729 */
4730 inputFormat?: string;
4731 /**
4732 * Optional. The physical location of the table (e.g. `gs://spark-dataproc-data/pangea-data/case_sensitive/` or `gs://spark-dataproc-data/pangea-data/*`). The maximum length is 2056 bytes.
4733 */
4734 locationUri?: string;
4735 /**
4736 * Optional. Specifies the fully qualified class name of the OutputFormat (e.g. "org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat"). The maximum length is 128 characters.
4737 */
4738 outputFormat?: string;
4739 /**
4740 * Optional. Serializer and deserializer information.
4741 */
4742 serdeInfo?: ISerDeInfo;
4743 };
4744
4745 type IStreamingbuffer = {
4746 /**
4747 * Output only. A lower-bound estimate of the number of bytes currently in the streaming buffer.
4748 */
4749 estimatedBytes?: string;
4750 /**
4751 * Output only. A lower-bound estimate of the number of rows currently in the streaming buffer.
4752 */
4753 estimatedRows?: string;
4754 /**
4755 * Output only. Contains the timestamp of the oldest entry in the streaming buffer, in milliseconds since the epoch, if the streaming buffer is available.
4756 */
4757 oldestEntryTime?: string;
4758 };
4759
4760 /**
4761 * Search space for string and enum.
4762 */
4763 type IStringHparamSearchSpace = {
4764 /**
4765 * Canididates for the string or enum parameter in lower case.
4766 */
4767 candidates?: Array<string>;
4768 };
4769
4770 /**
4771 * System variables given to a query.
4772 */
4773 type ISystemVariables = {
4774 /**
4775 * Output only. Data type for each system variable.
4776 */
4777 types?: {[key: string]: IStandardSqlDataType};
4778 /**
4779 * Output only. Value for each system variable.
4780 */
4781 values?: {[key: string]: any};
4782 };
4783
4784 type ITable = {
4785 /**
4786 * Optional. Specifies the configuration of a BigLake managed table.
4787 */
4788 biglakeConfiguration?: IBigLakeConfiguration;
4789 /**
4790 * Output only. Contains information about the clone. This value is set via the clone operation.
4791 */
4792 cloneDefinition?: ICloneDefinition;
4793 /**
4794 * Clustering specification for the table. Must be specified with time-based partitioning, data in the table will be first partitioned and subsequently clustered.
4795 */
4796 clustering?: IClustering;
4797 /**
4798 * Output only. The time when this table was created, in milliseconds since the epoch.
4799 */
4800 creationTime?: string;
4801 /**
4802 * Optional. Defines the default collation specification of new STRING fields in the table. During table creation or update, if a STRING field is added to this table without explicit collation specified, then the table inherits the table default collation. A change to this field affects only fields added afterwards, and does not alter the existing fields. The following values are supported: * 'und:ci': undetermined locale, case insensitive. * '': empty string. Default to case-sensitive behavior.
4803 */
4804 defaultCollation?: string;
4805 /**
4806 * Optional. Defines the default rounding mode specification of new decimal fields (NUMERIC OR BIGNUMERIC) in the table. During table creation or update, if a decimal field is added to this table without an explicit rounding mode specified, then the field inherits the table default rounding mode. Changing this field doesn't affect existing fields.
4807 */
4808 defaultRoundingMode?:
4809 | 'ROUNDING_MODE_UNSPECIFIED'
4810 | 'ROUND_HALF_AWAY_FROM_ZERO'
4811 | 'ROUND_HALF_EVEN';
4812 /**
4813 * Optional. A user-friendly description of this table.
4814 */
4815 description?: string;
4816 /**
4817 * Custom encryption configuration (e.g., Cloud KMS keys).
4818 */
4819 encryptionConfiguration?: IEncryptionConfiguration;
4820 /**
4821 * Output only. A hash of this resource.
4822 */
4823 etag?: string;
4824 /**
4825 * 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.
4826 */
4827 expirationTime?: string;
4828 /**
4829 * Optional. Options defining open source compatible table.
4830 */
4831 externalCatalogTableOptions?: IExternalCatalogTableOptions;
4832 /**
4833 * 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.
4834 */
4835 externalDataConfiguration?: IExternalDataConfiguration;
4836 /**
4837 * Optional. A descriptive name for this table.
4838 */
4839 friendlyName?: string;
4840 /**
4841 * Output only. An opaque ID uniquely identifying the table.
4842 */
4843 id?: string;
4844 /**
4845 * The type of resource ID.
4846 */
4847 kind?: string;
4848 /**
4849 * 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.
4850 */
4851 labels?: {[key: string]: string};
4852 /**
4853 * Output only. The time when this table was last modified, in milliseconds since the epoch.
4854 */
4855 lastModifiedTime?: string;
4856 /**
4857 * Output only. The geographic location where the table resides. This value is inherited from the dataset.
4858 */
4859 location?: string;
4860 /**
4861 * Optional. The materialized view definition.
4862 */
4863 materializedView?: IMaterializedViewDefinition;
4864 /**
4865 * Output only. The materialized view status.
4866 */
4867 materializedViewStatus?: IMaterializedViewStatus;
4868 /**
4869 * Optional. The maximum staleness of data that could be returned when the table (or stale MV) is queried. Staleness encoded as a string encoding of sql IntervalValue type.
4870 */
4871 maxStaleness?: string;
4872 /**
4873 * Deprecated.
4874 */
4875 model?: IModelDefinition;
4876 /**
4877 * Output only. Number of logical bytes that are less than 90 days old.
4878 */
4879 numActiveLogicalBytes?: string;
4880 /**
4881 * Output only. Number of physical bytes less than 90 days old. This data is not kept in real time, and might be delayed by a few seconds to a few minutes.
4882 */
4883 numActivePhysicalBytes?: string;
4884 /**
4885 * Output only. The size of this table in logical bytes, excluding any data in the streaming buffer.
4886 */
4887 numBytes?: string;
4888 /**
4889 * Output only. Number of physical bytes used by current live data storage. This data is not kept in real time, and might be delayed by a few seconds to a few minutes.
4890 */
4891 numCurrentPhysicalBytes?: string;
4892 /**
4893 * Output only. The number of logical bytes in the table that are considered "long-term storage".
4894 */
4895 numLongTermBytes?: string;
4896 /**
4897 * Output only. Number of logical bytes that are more than 90 days old.
4898 */
4899 numLongTermLogicalBytes?: string;
4900 /**
4901 * Output only. Number of physical bytes more than 90 days old. This data is not kept in real time, and might be delayed by a few seconds to a few minutes.
4902 */
4903 numLongTermPhysicalBytes?: string;
4904 /**
4905 * Output only. The number of partitions present in the table or materialized view. This data is not kept in real time, and might be delayed by a few seconds to a few minutes.
4906 */
4907 numPartitions?: string;
4908 /**
4909 * Output only. The physical size of this table in bytes. This includes storage used for time travel.
4910 */
4911 numPhysicalBytes?: string;
4912 /**
4913 * Output only. The number of rows of data in this table, excluding any data in the streaming buffer.
4914 */
4915 numRows?: string;
4916 /**
4917 * Output only. Number of physical bytes used by time travel storage (deleted or changed data). This data is not kept in real time, and might be delayed by a few seconds to a few minutes.
4918 */
4919 numTimeTravelPhysicalBytes?: string;
4920 /**
4921 * Output only. Total number of logical bytes in the table or materialized view.
4922 */
4923 numTotalLogicalBytes?: string;
4924 /**
4925 * Output only. The physical size of this table in bytes. This also includes storage used for time travel. This data is not kept in real time, and might be delayed by a few seconds to a few minutes.
4926 */
4927 numTotalPhysicalBytes?: string;
4928 /**
4929 * Optional. The partition information for all table formats, including managed partitioned tables, hive partitioned tables, iceberg partitioned, and metastore partitioned tables. This field is only populated for metastore partitioned tables. For other table formats, this is an output only field.
4930 */
4931 partitionDefinition?: IPartitioningDefinition;
4932 /**
4933 * If specified, configures range partitioning for this table.
4934 */
4935 rangePartitioning?: IRangePartitioning;
4936 /**
4937 * Optional. Output only. Table references of all replicas currently active on the table.
4938 */
4939 replicas?: Array<ITableReference>;
4940 /**
4941 * Optional. If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified.
4942 */
4943 requirePartitionFilter?: boolean;
4944 /**
4945 * [Optional] The tags associated with this table. Tag keys are globally unique. See additional information on [tags](https://cloud.google.com/iam/docs/tags-access-control#definitions). An object containing a list of "key": value pairs. The key is the namespaced friendly name of the tag key, e.g. "12345/environment" where 12345 is parent id. The value is the friendly short name of the tag value, e.g. "production".
4946 */
4947 resourceTags?: {[key: string]: string};
4948 /**
4949 * Optional. Output only. Restriction config for table. If set, restrict certain accesses on the table based on the config. See [Data egress](https://cloud.google.com/bigquery/docs/analytics-hub-introduction#data_egress) for more details.
4950 */
4951 restrictions?: IRestrictionConfig;
4952 /**
4953 * Optional. Describes the schema of this table.
4954 */
4955 schema?: ITableSchema;
4956 /**
4957 * Output only. A URL that can be used to access this resource again.
4958 */
4959 selfLink?: string;
4960 /**
4961 * Output only. Contains information about the snapshot. This value is set via snapshot creation.
4962 */
4963 snapshotDefinition?: ISnapshotDefinition;
4964 /**
4965 * 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.
4966 */
4967 streamingBuffer?: IStreamingbuffer;
4968 /**
4969 * Optional. Tables Primary Key and Foreign Key information
4970 */
4971 tableConstraints?: ITableConstraints;
4972 /**
4973 * Required. Reference describing the ID of this table.
4974 */
4975 tableReference?: ITableReference;
4976 /**
4977 * Optional. Table replication info for table created `AS REPLICA` DDL like: `CREATE MATERIALIZED VIEW mv1 AS REPLICA OF src_mv`
4978 */
4979 tableReplicationInfo?: ITableReplicationInfo;
4980 /**
4981 * If specified, configures time-based partitioning for this table.
4982 */
4983 timePartitioning?: ITimePartitioning;
4984 /**
4985 * 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. * `EXTERNAL`: A table that references data stored in an external storage system, such as Google Cloud Storage. * `MATERIALIZED_VIEW`: A precomputed view defined by a SQL query. * `SNAPSHOT`: An immutable BigQuery table that preserves the contents of a base table at a particular time. See additional information on [table snapshots](https://cloud.google.com/bigquery/docs/table-snapshots-intro). The default value is `TABLE`.
4986 */
4987 type?: string;
4988 /**
4989 * Optional. The view definition.
4990 */
4991 view?: IViewDefinition;
4992 };
4993
4994 type ITableCell = {v?: any};
4995
4996 /**
4997 * The TableConstraints defines the primary key and foreign key.
4998 */
4999 type ITableConstraints = {
5000 /**
5001 * Optional. Present only if the table has a foreign key. The foreign key is not enforced.
5002 */
5003 foreignKeys?: Array<{
5004 /**
5005 * Required. The columns that compose the foreign key.
5006 */
5007 columnReferences?: Array<{
5008 /**
5009 * Required. The column in the primary key that are referenced by the referencing_column.
5010 */
5011 referencedColumn?: string;
5012 /**
5013 * Required. The column that composes the foreign key.
5014 */
5015 referencingColumn?: string;
5016 }>;
5017 /**
5018 * Optional. Set only if the foreign key constraint is named.
5019 */
5020 name?: string;
5021 referencedTable?: {
5022 datasetId?: string;
5023 projectId?: string;
5024 tableId?: string;
5025 };
5026 }>;
5027 /**
5028 * Represents the primary key constraint on a table's columns.
5029 */
5030 primaryKey?: {
5031 /**
5032 * Required. The columns that are composed of the primary key constraint.
5033 */
5034 columns?: Array<string>;
5035 };
5036 };
5037
5038 /**
5039 * Request for sending a single streaming insert.
5040 */
5041 type ITableDataInsertAllRequest = {
5042 /**
5043 * 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.
5044 */
5045 ignoreUnknownValues?: boolean;
5046 /**
5047 * Optional. The resource type of the response. The value is not checked at the backend. Historically, it has been set to "bigquery#tableDataInsertAllRequest" but you are not required to set it.
5048 */
5049 kind?: string;
5050 rows?: Array<{
5051 /**
5052 * Insertion ID for best-effort deduplication. This feature is not recommended, and users seeking stronger insertion semantics are encouraged to use other mechanisms such as the BigQuery Write API.
5053 */
5054 insertId?: string;
5055 /**
5056 * Data for a single row.
5057 */
5058 json?: IJsonObject;
5059 }>;
5060 /**
5061 * 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.
5062 */
5063 skipInvalidRows?: boolean;
5064 /**
5065 * Optional. 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.
5066 */
5067 templateSuffix?: string;
5068 /**
5069 * Optional. Unique request trace id. Used for debugging purposes only. It is case-sensitive, limited to up to 36 ASCII characters. A UUID is recommended.
5070 */
5071 traceId?: string;
5072 };
5073
5074 /**
5075 * Describes the format of a streaming insert response.
5076 */
5077 type ITableDataInsertAllResponse = {
5078 /**
5079 * Describes specific errors encountered while processing the request.
5080 */
5081 insertErrors?: Array<{
5082 /**
5083 * Error information for the row indicated by the index property.
5084 */
5085 errors?: Array<IErrorProto>;
5086 /**
5087 * The index of the row that error applies to.
5088 */
5089 index?: number;
5090 }>;
5091 /**
5092 * Returns "bigquery#tableDataInsertAllResponse".
5093 */
5094 kind?: string;
5095 };
5096
5097 type ITableDataList = {
5098 /**
5099 * A hash of this page of results.
5100 */
5101 etag?: string;
5102 /**
5103 * The resource type of the response.
5104 */
5105 kind?: string;
5106 /**
5107 * 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.
5108 */
5109 pageToken?: string;
5110 /**
5111 * Rows of results.
5112 */
5113 rows?: Array<ITableRow>;
5114 /**
5115 * Total rows of the entire table. In order to show default value 0 we have to present it as string.
5116 */
5117 totalRows?: string;
5118 };
5119
5120 /**
5121 * A field in TableSchema
5122 */
5123 type ITableFieldSchema = {
5124 /**
5125 * Deprecated.
5126 */
5127 categories?: {
5128 /**
5129 * Deprecated.
5130 */
5131 names?: Array<string>;
5132 };
5133 /**
5134 * Optional. Field collation can be set only when the type of field is STRING. The following values are supported: * 'und:ci': undetermined locale, case insensitive. * '': empty string. Default to case-sensitive behavior.
5135 */
5136 collation?: string;
5137 /**
5138 * Optional. Data policy options, will replace the data_policies.
5139 */
5140 dataPolicies?: Array<IDataPolicyOption>;
5141 /**
5142 * Optional. A SQL expression to specify the [default value] (https://cloud.google.com/bigquery/docs/default-values) for this field.
5143 */
5144 defaultValueExpression?: string;
5145 /**
5146 * Optional. The field description. The maximum length is 1,024 characters.
5147 */
5148 description?: string;
5149 /**
5150 * Optional. Describes the nested schema fields if the type property is set to RECORD.
5151 */
5152 fields?: Array<ITableFieldSchema>;
5153 /**
5154 * Optional. Definition of the foreign data type. Only valid for top-level schema fields (not nested fields). If the type is FOREIGN, this field is required.
5155 */
5156 foreignTypeDefinition?: string;
5157 /**
5158 * 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".
5159 */
5160 maxLength?: string;
5161 /**
5162 * Optional. The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
5163 */
5164 mode?: string;
5165 /**
5166 * 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.
5167 */
5168 name?: string;
5169 /**
5170 * Optional. The policy tags attached to this field, used for field-level access control. If not set, defaults to empty policy_tags.
5171 */
5172 policyTags?: {
5173 /**
5174 * A list of policy tag resource names. For example, "projects/1/locations/eu/taxonomies/2/policyTags/3". At most 1 policy tag is currently allowed.
5175 */
5176 names?: Array<string>;
5177 };
5178 /**
5179 * 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.
5180 */
5181 precision?: string;
5182 /**
5183 * Represents the type of a field element.
5184 */
5185 rangeElementType?: {
5186 /**
5187 * Required. The type of a field element. For more information, see TableFieldSchema.type.
5188 */
5189 type?: string;
5190 };
5191 /**
5192 * Optional. Specifies the rounding mode to be used when storing values of NUMERIC and BIGNUMERIC type.
5193 */
5194 roundingMode?:
5195 | 'ROUNDING_MODE_UNSPECIFIED'
5196 | 'ROUND_HALF_AWAY_FROM_ZERO'
5197 | 'ROUND_HALF_EVEN';
5198 /**
5199 * Optional. See documentation for precision.
5200 */
5201 scale?: string;
5202 /**
5203 * Required. The field data type. Possible values include: * STRING * BYTES * INTEGER (or INT64) * FLOAT (or FLOAT64) * BOOLEAN (or BOOL) * TIMESTAMP * DATE * TIME * DATETIME * GEOGRAPHY * NUMERIC * BIGNUMERIC * JSON * RECORD (or STRUCT) * RANGE Use of RECORD/STRUCT indicates that the field contains a nested schema.
5204 */
5205 type?: string;
5206 };
5207
5208 /**
5209 * Partial projection of the metadata for a given table in a list response.
5210 */
5211 type ITableList = {
5212 /**
5213 * A hash of this page of results.
5214 */
5215 etag?: string;
5216 /**
5217 * The type of list.
5218 */
5219 kind?: string;
5220 /**
5221 * A token to request the next page of results.
5222 */
5223 nextPageToken?: string;
5224 /**
5225 * Tables in the requested dataset.
5226 */
5227 tables?: Array<{
5228 /**
5229 * Clustering specification for this table, if configured.
5230 */
5231 clustering?: IClustering;
5232 /**
5233 * Output only. The time when this table was created, in milliseconds since the epoch.
5234 */
5235 creationTime?: string;
5236 /**
5237 * 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.
5238 */
5239 expirationTime?: string;
5240 /**
5241 * The user-friendly name for this table.
5242 */
5243 friendlyName?: string;
5244 /**
5245 * An opaque ID of the table.
5246 */
5247 id?: string;
5248 /**
5249 * The resource type.
5250 */
5251 kind?: string;
5252 /**
5253 * The labels associated with this table. You can use these to organize and group your tables.
5254 */
5255 labels?: {[key: string]: string};
5256 /**
5257 * The range partitioning for this table.
5258 */
5259 rangePartitioning?: IRangePartitioning;
5260 /**
5261 * Optional. If set to true, queries including this table must specify a partition filter. This filter is used for partition elimination.
5262 */
5263 requirePartitionFilter?: boolean;
5264 /**
5265 * A reference uniquely identifying table.
5266 */
5267 tableReference?: ITableReference;
5268 /**
5269 * The time-based partitioning for this table.
5270 */
5271 timePartitioning?: ITimePartitioning;
5272 /**
5273 * The type of table.
5274 */
5275 type?: string;
5276 /**
5277 * Information about a logical view.
5278 */
5279 view?: {
5280 /**
5281 * Specifices the privacy policy for the view.
5282 */
5283 privacyPolicy?: IPrivacyPolicy;
5284 /**
5285 * True if view is defined in legacy SQL dialect, false if in GoogleSQL.
5286 */
5287 useLegacySql?: boolean;
5288 };
5289 }>;
5290 /**
5291 * The total number of tables in the dataset.
5292 */
5293 totalItems?: number;
5294 };
5295
5296 /**
5297 * Table level detail on the usage of metadata caching. Only set for Metadata caching eligible tables referenced in the query.
5298 */
5299 type ITableMetadataCacheUsage = {
5300 /**
5301 * Free form human-readable reason metadata caching was unused for the job.
5302 */
5303 explanation?: string;
5304 /**
5305 * Duration since last refresh as of this job for managed tables (indicates metadata cache staleness as seen by this job).
5306 */
5307 staleness?: string;
5308 /**
5309 * Metadata caching eligible table referenced in the query.
5310 */
5311 tableReference?: ITableReference;
5312 /**
5313 * [Table type](https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#Table.FIELDS.type).
5314 */
5315 tableType?: string;
5316 /**
5317 * Reason for not using metadata caching for the table.
5318 */
5319 unusedReason?:
5320 | 'UNUSED_REASON_UNSPECIFIED'
5321 | 'EXCEEDED_MAX_STALENESS'
5322 | 'METADATA_CACHING_NOT_ENABLED'
5323 | 'OTHER_REASON';
5324 };
5325
5326 type ITableReference = {
5327 /**
5328 * Required. The ID of the dataset containing this table.
5329 */
5330 datasetId?: string;
5331 /**
5332 * Required. The ID of the project containing this table.
5333 */
5334 projectId?: string;
5335 /**
5336 * Required. The ID of the table. The ID can contain Unicode characters in category L (letter), M (mark), N (number), Pc (connector, including underscore), Pd (dash), and Zs (space). For more information, see [General Category](https://wikipedia.org/wiki/Unicode_character_property#General_Category). The maximum length is 1,024 characters. Certain operations allow suffixing of the table ID with a partition decorator, such as `sample_table$20190123`.
5337 */
5338 tableId?: string;
5339 };
5340
5341 /**
5342 * Replication info of a table created using `AS REPLICA` DDL like: `CREATE MATERIALIZED VIEW mv1 AS REPLICA OF src_mv`
5343 */
5344 type ITableReplicationInfo = {
5345 /**
5346 * Optional. Output only. If source is a materialized view, this field signifies the last refresh time of the source.
5347 */
5348 replicatedSourceLastRefreshTime?: string;
5349 /**
5350 * Optional. Output only. Replication error that will permanently stopped table replication.
5351 */
5352 replicationError?: IErrorProto;
5353 /**
5354 * Optional. Specifies the interval at which the source table is polled for updates. It's Optional. If not specified, default replication interval would be applied.
5355 */
5356 replicationIntervalMs?: string;
5357 /**
5358 * Optional. Output only. Replication status of configured replication.
5359 */
5360 replicationStatus?:
5361 | 'REPLICATION_STATUS_UNSPECIFIED'
5362 | 'ACTIVE'
5363 | 'SOURCE_DELETED'
5364 | 'PERMISSION_DENIED'
5365 | 'UNSUPPORTED_CONFIGURATION';
5366 /**
5367 * Required. Source table reference that is replicated.
5368 */
5369 sourceTable?: ITableReference;
5370 };
5371
5372 type ITableRow = {
5373 /**
5374 * Represents a single row in the result set, consisting of one or more fields.
5375 */
5376 f?: Array<ITableCell>;
5377 };
5378
5379 /**
5380 * Schema of a table
5381 */
5382 type ITableSchema = {
5383 /**
5384 * Describes the fields in a table.
5385 */
5386 fields?: Array<ITableFieldSchema>;
5387 /**
5388 * Optional. Specifies metadata of the foreign data type definition in field schema (TableFieldSchema.foreign_type_definition).
5389 */
5390 foreignTypeInfo?: IForeignTypeInfo;
5391 };
5392
5393 /**
5394 * Request message for `TestIamPermissions` method.
5395 */
5396 type ITestIamPermissionsRequest = {
5397 /**
5398 * 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).
5399 */
5400 permissions?: Array<string>;
5401 };
5402
5403 /**
5404 * Response message for `TestIamPermissions` method.
5405 */
5406 type ITestIamPermissionsResponse = {
5407 /**
5408 * A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
5409 */
5410 permissions?: Array<string>;
5411 };
5412
5413 type ITimePartitioning = {
5414 /**
5415 * Optional. Number of milliseconds for which to keep the storage for a partition. A wrapper is used here because 0 is an invalid value.
5416 */
5417 expirationMs?: string;
5418 /**
5419 * Optional. If not set, the table is partitioned by pseudo column '_PARTITIONTIME'; if set, the table is partitioned by this field. The field must be a top-level TIMESTAMP or DATE field. Its mode must be NULLABLE or REQUIRED. A wrapper is used here because an empty string is an invalid value.
5420 */
5421 field?: string;
5422 /**
5423 * If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified. This field is deprecated; please set the field with the same name on the table itself instead. This field needs a wrapper because we want to output the default value, false, if the user explicitly set it.
5424 */
5425 requirePartitionFilter?: boolean;
5426 /**
5427 * Required. The supported types are DAY, HOUR, MONTH, and YEAR, which will generate one partition per day, hour, month, and year, respectively.
5428 */
5429 type?: string;
5430 };
5431
5432 /**
5433 * Options used in model training.
5434 */
5435 type ITrainingOptions = {
5436 /**
5437 * Activation function of the neural nets.
5438 */
5439 activationFn?: string;
5440 /**
5441 * If true, detect step changes and make data adjustment in the input time series.
5442 */
5443 adjustStepChanges?: boolean;
5444 /**
5445 * Whether to use approximate feature contribution method in XGBoost model explanation for global explain.
5446 */
5447 approxGlobalFeatureContrib?: boolean;
5448 /**
5449 * Whether to enable auto ARIMA or not.
5450 */
5451 autoArima?: boolean;
5452 /**
5453 * The max value of the sum of non-seasonal p and q.
5454 */
5455 autoArimaMaxOrder?: string;
5456 /**
5457 * The min value of the sum of non-seasonal p and q.
5458 */
5459 autoArimaMinOrder?: string;
5460 /**
5461 * Whether to calculate class weights automatically based on the popularity of each label.
5462 */
5463 autoClassWeights?: boolean;
5464 /**
5465 * Batch size for dnn models.
5466 */
5467 batchSize?: string;
5468 /**
5469 * Booster type for boosted tree models.
5470 */
5471 boosterType?: 'BOOSTER_TYPE_UNSPECIFIED' | 'GBTREE' | 'DART';
5472 /**
5473 * Budget in hours for AutoML training.
5474 */
5475 budgetHours?: number;
5476 /**
5477 * Whether or not p-value test should be computed for this model. Only available for linear and logistic regression models.
5478 */
5479 calculatePValues?: boolean;
5480 /**
5481 * Categorical feature encoding method.
5482 */
5483 categoryEncodingMethod?:
5484 | 'ENCODING_METHOD_UNSPECIFIED'
5485 | 'ONE_HOT_ENCODING'
5486 | 'LABEL_ENCODING'
5487 | 'DUMMY_ENCODING';
5488 /**
5489 * If true, clean spikes and dips in the input time series.
5490 */
5491 cleanSpikesAndDips?: boolean;
5492 /**
5493 * Enums for color space, used for processing images in Object Table. See more details at https://www.tensorflow.org/io/tutorials/colorspace.
5494 */
5495 colorSpace?:
5496 | 'COLOR_SPACE_UNSPECIFIED'
5497 | 'RGB'
5498 | 'HSV'
5499 | 'YIQ'
5500 | 'YUV'
5501 | 'GRAYSCALE';
5502 /**
5503 * Subsample ratio of columns for each level for boosted tree models.
5504 */
5505 colsampleBylevel?: number;
5506 /**
5507 * Subsample ratio of columns for each node(split) for boosted tree models.
5508 */
5509 colsampleBynode?: number;
5510 /**
5511 * Subsample ratio of columns when constructing each tree for boosted tree models.
5512 */
5513 colsampleBytree?: number;
5514 /**
5515 * Type of normalization algorithm for boosted tree models using dart booster.
5516 */
5517 dartNormalizeType?: 'DART_NORMALIZE_TYPE_UNSPECIFIED' | 'TREE' | 'FOREST';
5518 /**
5519 * The data frequency of a time series.
5520 */
5521 dataFrequency?:
5522 | 'DATA_FREQUENCY_UNSPECIFIED'
5523 | 'AUTO_FREQUENCY'
5524 | 'YEARLY'
5525 | 'QUARTERLY'
5526 | 'MONTHLY'
5527 | 'WEEKLY'
5528 | 'DAILY'
5529 | 'HOURLY'
5530 | 'PER_MINUTE';
5531 /**
5532 * 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
5533 */
5534 dataSplitColumn?: string;
5535 /**
5536 * 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.
5537 */
5538 dataSplitEvalFraction?: number;
5539 /**
5540 * The data split type for training and evaluation, e.g. RANDOM.
5541 */
5542 dataSplitMethod?:
5543 | 'DATA_SPLIT_METHOD_UNSPECIFIED'
5544 | 'RANDOM'
5545 | 'CUSTOM'
5546 | 'SEQUENTIAL'
5547 | 'NO_SPLIT'
5548 | 'AUTO_SPLIT';
5549 /**
5550 * If true, perform decompose time series and save the results.
5551 */
5552 decomposeTimeSeries?: boolean;
5553 /**
5554 * Distance type for clustering models.
5555 */
5556 distanceType?: 'DISTANCE_TYPE_UNSPECIFIED' | 'EUCLIDEAN' | 'COSINE';
5557 /**
5558 * Dropout probability for dnn models.
5559 */
5560 dropout?: number;
5561 /**
5562 * Whether to stop early when the loss doesn't improve significantly any more (compared to min_relative_progress). Used only for iterative training algorithms.
5563 */
5564 earlyStop?: boolean;
5565 /**
5566 * If true, enable global explanation during training.
5567 */
5568 enableGlobalExplain?: boolean;
5569 /**
5570 * Feedback type that specifies which algorithm to run for matrix factorization.
5571 */
5572 feedbackType?: 'FEEDBACK_TYPE_UNSPECIFIED' | 'IMPLICIT' | 'EXPLICIT';
5573 /**
5574 * Whether the model should include intercept during model training.
5575 */
5576 fitIntercept?: boolean;
5577 /**
5578 * Hidden units for dnn models.
5579 */
5580 hiddenUnits?: Array<string>;
5581 /**
5582 * 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.
5583 */
5584 holidayRegion?:
5585 | 'HOLIDAY_REGION_UNSPECIFIED'
5586 | 'GLOBAL'
5587 | 'NA'
5588 | 'JAPAC'
5589 | 'EMEA'
5590 | 'LAC'
5591 | 'AE'
5592 | 'AR'
5593 | 'AT'
5594 | 'AU'
5595 | 'BE'
5596 | 'BR'
5597 | 'CA'
5598 | 'CH'
5599 | 'CL'
5600 | 'CN'
5601 | 'CO'
5602 | 'CS'
5603 | 'CZ'
5604 | 'DE'
5605 | 'DK'
5606 | 'DZ'
5607 | 'EC'
5608 | 'EE'
5609 | 'EG'
5610 | 'ES'
5611 | 'FI'
5612 | 'FR'
5613 | 'GB'
5614 | 'GR'
5615 | 'HK'
5616 | 'HU'
5617 | 'ID'
5618 | 'IE'
5619 | 'IL'
5620 | 'IN'
5621 | 'IR'
5622 | 'IT'
5623 | 'JP'
5624 | 'KR'
5625 | 'LV'
5626 | 'MA'
5627 | 'MX'
5628 | 'MY'
5629 | 'NG'
5630 | 'NL'
5631 | 'NO'
5632 | 'NZ'
5633 | 'PE'
5634 | 'PH'
5635 | 'PK'
5636 | 'PL'
5637 | 'PT'
5638 | 'RO'
5639 | 'RS'
5640 | 'RU'
5641 | 'SA'
5642 | 'SE'
5643 | 'SG'
5644 | 'SI'
5645 | 'SK'
5646 | 'TH'
5647 | 'TR'
5648 | 'TW'
5649 | 'UA'
5650 | 'US'
5651 | 'VE'
5652 | 'VN'
5653 | 'ZA';
5654 /**
5655 * A list of geographical regions that are used for time series modeling.
5656 */
5657 holidayRegions?: Array<
5658 | 'HOLIDAY_REGION_UNSPECIFIED'
5659 | 'GLOBAL'
5660 | 'NA'
5661 | 'JAPAC'
5662 | 'EMEA'
5663 | 'LAC'
5664 | 'AE'
5665 | 'AR'
5666 | 'AT'
5667 | 'AU'
5668 | 'BE'
5669 | 'BR'
5670 | 'CA'
5671 | 'CH'
5672 | 'CL'
5673 | 'CN'
5674 | 'CO'
5675 | 'CS'
5676 | 'CZ'
5677 | 'DE'
5678 | 'DK'
5679 | 'DZ'
5680 | 'EC'
5681 | 'EE'
5682 | 'EG'
5683 | 'ES'
5684 | 'FI'
5685 | 'FR'
5686 | 'GB'
5687 | 'GR'
5688 | 'HK'
5689 | 'HU'
5690 | 'ID'
5691 | 'IE'
5692 | 'IL'
5693 | 'IN'
5694 | 'IR'
5695 | 'IT'
5696 | 'JP'
5697 | 'KR'
5698 | 'LV'
5699 | 'MA'
5700 | 'MX'
5701 | 'MY'
5702 | 'NG'
5703 | 'NL'
5704 | 'NO'
5705 | 'NZ'
5706 | 'PE'
5707 | 'PH'
5708 | 'PK'
5709 | 'PL'
5710 | 'PT'
5711 | 'RO'
5712 | 'RS'
5713 | 'RU'
5714 | 'SA'
5715 | 'SE'
5716 | 'SG'
5717 | 'SI'
5718 | 'SK'
5719 | 'TH'
5720 | 'TR'
5721 | 'TW'
5722 | 'UA'
5723 | 'US'
5724 | 'VE'
5725 | 'VN'
5726 | 'ZA'
5727 >;
5728 /**
5729 * The number of periods ahead that need to be forecasted.
5730 */
5731 horizon?: string;
5732 /**
5733 * The target evaluation metrics to optimize the hyperparameters for.
5734 */
5735 hparamTuningObjectives?: Array<
5736 | 'HPARAM_TUNING_OBJECTIVE_UNSPECIFIED'
5737 | 'MEAN_ABSOLUTE_ERROR'
5738 | 'MEAN_SQUARED_ERROR'
5739 | 'MEAN_SQUARED_LOG_ERROR'
5740 | 'MEDIAN_ABSOLUTE_ERROR'
5741 | 'R_SQUARED'
5742 | 'EXPLAINED_VARIANCE'
5743 | 'PRECISION'
5744 | 'RECALL'
5745 | 'ACCURACY'
5746 | 'F1_SCORE'
5747 | 'LOG_LOSS'
5748 | 'ROC_AUC'
5749 | 'DAVIES_BOULDIN_INDEX'
5750 | 'MEAN_AVERAGE_PRECISION'
5751 | 'NORMALIZED_DISCOUNTED_CUMULATIVE_GAIN'
5752 | 'AVERAGE_RANK'
5753 >;
5754 /**
5755 * Include drift when fitting an ARIMA model.
5756 */
5757 includeDrift?: boolean;
5758 /**
5759 * Specifies the initial learning rate for the line search learn rate strategy.
5760 */
5761 initialLearnRate?: number;
5762 /**
5763 * Name of input label columns in training data.
5764 */
5765 inputLabelColumns?: Array<string>;
5766 /**
5767 * Name of the instance weight column for training data. This column isn't be used as a feature.
5768 */
5769 instanceWeightColumn?: string;
5770 /**
5771 * Number of integral steps for the integrated gradients explain method.
5772 */
5773 integratedGradientsNumSteps?: string;
5774 /**
5775 * Item column specified for matrix factorization models.
5776 */
5777 itemColumn?: string;
5778 /**
5779 * The column used to provide the initial centroids for kmeans algorithm when kmeans_initialization_method is CUSTOM.
5780 */
5781 kmeansInitializationColumn?: string;
5782 /**
5783 * The method used to initialize the centroids for kmeans algorithm.
5784 */
5785 kmeansInitializationMethod?:
5786 | 'KMEANS_INITIALIZATION_METHOD_UNSPECIFIED'
5787 | 'RANDOM'
5788 | 'CUSTOM'
5789 | 'KMEANS_PLUS_PLUS';
5790 /**
5791 * L1 regularization coefficient to activations.
5792 */
5793 l1RegActivation?: number;
5794 /**
5795 * L1 regularization coefficient.
5796 */
5797 l1Regularization?: number;
5798 /**
5799 * L2 regularization coefficient.
5800 */
5801 l2Regularization?: number;
5802 /**
5803 * Weights associated with each label class, for rebalancing the training data. Only applicable for classification models.
5804 */
5805 labelClassWeights?: {[key: string]: number};
5806 /**
5807 * Learning rate in training. Used only for iterative training algorithms.
5808 */
5809 learnRate?: number;
5810 /**
5811 * The strategy to determine learn rate for the current iteration.
5812 */
5813 learnRateStrategy?:
5814 | 'LEARN_RATE_STRATEGY_UNSPECIFIED'
5815 | 'LINE_SEARCH'
5816 | 'CONSTANT';
5817 /**
5818 * Type of loss function used during training run.
5819 */
5820 lossType?: 'LOSS_TYPE_UNSPECIFIED' | 'MEAN_SQUARED_LOSS' | 'MEAN_LOG_LOSS';
5821 /**
5822 * The maximum number of iterations in training. Used only for iterative training algorithms.
5823 */
5824 maxIterations?: string;
5825 /**
5826 * Maximum number of trials to run in parallel.
5827 */
5828 maxParallelTrials?: string;
5829 /**
5830 * The maximum number of time points in a time series that can be used in modeling the trend component of the time series. Don't use this option with the `timeSeriesLengthFraction` or `minTimeSeriesLength` options.
5831 */
5832 maxTimeSeriesLength?: string;
5833 /**
5834 * Maximum depth of a tree for boosted tree models.
5835 */
5836 maxTreeDepth?: string;
5837 /**
5838 * When early_stop is true, stops training when accuracy improvement is less than 'min_relative_progress'. Used only for iterative training algorithms.
5839 */
5840 minRelativeProgress?: number;
5841 /**
5842 * Minimum split loss for boosted tree models.
5843 */
5844 minSplitLoss?: number;
5845 /**
5846 * The minimum number of time points in a time series that are used in modeling the trend component of the time series. If you use this option you must also set the `timeSeriesLengthFraction` option. This training option ensures that enough time points are available when you use `timeSeriesLengthFraction` in trend modeling. This is particularly important when forecasting multiple time series in a single query using `timeSeriesIdColumn`. If the total number of time points is less than the `minTimeSeriesLength` value, then the query uses all available time points.
5847 */
5848 minTimeSeriesLength?: string;
5849 /**
5850 * Minimum sum of instance weight needed in a child for boosted tree models.
5851 */
5852 minTreeChildWeight?: string;
5853 /**
5854 * The model registry.
5855 */
5856 modelRegistry?: 'MODEL_REGISTRY_UNSPECIFIED' | 'VERTEX_AI';
5857 /**
5858 * Google Cloud Storage URI from which the model was imported. Only applicable for imported models.
5859 */
5860 modelUri?: string;
5861 /**
5862 * 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.
5863 */
5864 nonSeasonalOrder?: IArimaOrder;
5865 /**
5866 * Number of clusters for clustering models.
5867 */
5868 numClusters?: string;
5869 /**
5870 * Num factors specified for matrix factorization models.
5871 */
5872 numFactors?: string;
5873 /**
5874 * Number of parallel trees constructed during each iteration for boosted tree models.
5875 */
5876 numParallelTree?: string;
5877 /**
5878 * Number of principal components to keep in the PCA model. Must be <= the number of features.
5879 */
5880 numPrincipalComponents?: string;
5881 /**
5882 * Number of trials to run this hyperparameter tuning job.
5883 */
5884 numTrials?: string;
5885 /**
5886 * Optimization strategy for training linear regression models.
5887 */
5888 optimizationStrategy?:
5889 | 'OPTIMIZATION_STRATEGY_UNSPECIFIED'
5890 | 'BATCH_GRADIENT_DESCENT'
5891 | 'NORMAL_EQUATION';
5892 /**
5893 * Optimizer used for training the neural nets.
5894 */
5895 optimizer?: string;
5896 /**
5897 * The minimum ratio of cumulative explained variance that needs to be given by the PCA model.
5898 */
5899 pcaExplainedVarianceRatio?: number;
5900 /**
5901 * The solver for PCA.
5902 */
5903 pcaSolver?: 'UNSPECIFIED' | 'FULL' | 'RANDOMIZED' | 'AUTO';
5904 /**
5905 * Number of paths for the sampled Shapley explain method.
5906 */
5907 sampledShapleyNumPaths?: string;
5908 /**
5909 * If true, scale the feature values by dividing the feature standard deviation. Currently only apply to PCA.
5910 */
5911 scaleFeatures?: boolean;
5912 /**
5913 * Whether to standardize numerical features. Default to true.
5914 */
5915 standardizeFeatures?: boolean;
5916 /**
5917 * Subsample fraction of the training data to grow tree to prevent overfitting for boosted tree models.
5918 */
5919 subsample?: number;
5920 /**
5921 * Based on the selected TF version, the corresponding docker image is used to train external models.
5922 */
5923 tfVersion?: string;
5924 /**
5925 * Column to be designated as time series data for ARIMA model.
5926 */
5927 timeSeriesDataColumn?: string;
5928 /**
5929 * The time series id column that was used during ARIMA model training.
5930 */
5931 timeSeriesIdColumn?: string;
5932 /**
5933 * The time series id columns that were used during ARIMA model training.
5934 */
5935 timeSeriesIdColumns?: Array<string>;
5936 /**
5937 * The fraction of the interpolated length of the time series that's used to model the time series trend component. All of the time points of the time series are used to model the non-trend component. This training option accelerates modeling training without sacrificing much forecasting accuracy. You can use this option with `minTimeSeriesLength` but not with `maxTimeSeriesLength`.
5938 */
5939 timeSeriesLengthFraction?: number;
5940 /**
5941 * Column to be designated as time series timestamp for ARIMA model.
5942 */
5943 timeSeriesTimestampColumn?: string;
5944 /**
5945 * Tree construction algorithm for boosted tree models.
5946 */
5947 treeMethod?:
5948 | 'TREE_METHOD_UNSPECIFIED'
5949 | 'AUTO'
5950 | 'EXACT'
5951 | 'APPROX'
5952 | 'HIST';
5953 /**
5954 * Smoothing window size for the trend component. When a positive value is specified, a center moving average smoothing is applied on the history trend. When the smoothing window is out of the boundary at the beginning or the end of the trend, the first element or the last element is padded to fill the smoothing window before the average is applied.
5955 */
5956 trendSmoothingWindowSize?: string;
5957 /**
5958 * User column specified for matrix factorization models.
5959 */
5960 userColumn?: string;
5961 /**
5962 * The version aliases to apply in Vertex AI model registry. Always overwrite if the version aliases exists in a existing model.
5963 */
5964 vertexAiModelVersionAliases?: Array<string>;
5965 /**
5966 * Hyperparameter for matrix factoration when implicit feedback type is specified.
5967 */
5968 walsAlpha?: number;
5969 /**
5970 * Whether to train a model from the last checkpoint.
5971 */
5972 warmStart?: boolean;
5973 /**
5974 * User-selected XGBoost versions for training of XGBoost models.
5975 */
5976 xgboostVersion?: string;
5977 };
5978
5979 /**
5980 * Information about a single training query run for the model.
5981 */
5982 type ITrainingRun = {
5983 /**
5984 * Output only. Global explanation contains the explanation of top features on the class level. Applies to classification models only.
5985 */
5986 classLevelGlobalExplanations?: Array<IGlobalExplanation>;
5987 /**
5988 * Output only. Data split result of the training run. Only set when the input data is actually split.
5989 */
5990 dataSplitResult?: IDataSplitResult;
5991 /**
5992 * Output only. The evaluation metrics over training/eval data that were computed at the end of training.
5993 */
5994 evaluationMetrics?: IEvaluationMetrics;
5995 /**
5996 * Output only. Global explanation contains the explanation of top features on the model level. Applies to both regression and classification models.
5997 */
5998 modelLevelGlobalExplanation?: IGlobalExplanation;
5999 /**
6000 * Output only. Output of each iteration run, results.size() <= max_iterations.
6001 */
6002 results?: Array<IIterationResult>;
6003 /**
6004 * Output only. The start time of this training run.
6005 */
6006 startTime?: string;
6007 /**
6008 * Output only. Options that were used for this training run, includes user specified and default options that were used.
6009 */
6010 trainingOptions?: ITrainingOptions;
6011 /**
6012 * Output only. The start time of this training run, in milliseconds since epoch.
6013 */
6014 trainingStartTime?: string;
6015 /**
6016 * The model id in the [Vertex AI Model Registry](https://cloud.google.com/vertex-ai/docs/model-registry/introduction) for this training run.
6017 */
6018 vertexAiModelId?: string;
6019 /**
6020 * Output only. The model version in the [Vertex AI Model Registry](https://cloud.google.com/vertex-ai/docs/model-registry/introduction) for this training run.
6021 */
6022 vertexAiModelVersion?: string;
6023 };
6024
6025 /**
6026 * [Alpha] Information of a multi-statement transaction.
6027 */
6028 type ITransactionInfo = {
6029 /**
6030 * Output only. [Alpha] Id of the transaction.
6031 */
6032 transactionId?: string;
6033 };
6034
6035 /**
6036 * Information about a single transform column.
6037 */
6038 type ITransformColumn = {
6039 /**
6040 * Output only. Name of the column.
6041 */
6042 name?: string;
6043 /**
6044 * Output only. The SQL expression used in the column transform.
6045 */
6046 transformSql?: string;
6047 /**
6048 * Output only. Data type of the column after the transform.
6049 */
6050 type?: IStandardSqlDataType;
6051 };
6052
6053 /**
6054 * Request format for undeleting a dataset.
6055 */
6056 type IUndeleteDatasetRequest = {
6057 /**
6058 * Optional. The exact time when the dataset was deleted. If not specified, the most recently deleted version is undeleted. Undeleting a dataset using deletion time is not supported.
6059 */
6060 deletionTime?: string;
6061 };
6062
6063 /**
6064 * This is used for defining User Defined Function (UDF) resources only when using legacy SQL. Users of GoogleSQL 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
6065 */
6066 type IUserDefinedFunctionResource = {
6067 /**
6068 * [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.
6069 */
6070 inlineCode?: string;
6071 /**
6072 * [Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path).
6073 */
6074 resourceUri?: string;
6075 };
6076
6077 /**
6078 * Statistics for a vector search query. Populated as part of JobStatistics2.
6079 */
6080 type IVectorSearchStatistics = {
6081 /**
6082 * When `indexUsageMode` is `UNUSED` or `PARTIALLY_USED`, this field explains why indexes were not used in all or part of the vector search query. If `indexUsageMode` is `FULLY_USED`, this field is not populated.
6083 */
6084 indexUnusedReasons?: Array<IIndexUnusedReason>;
6085 /**
6086 * Specifies the index usage mode for the query.
6087 */
6088 indexUsageMode?:
6089 | 'INDEX_USAGE_MODE_UNSPECIFIED'
6090 | 'UNUSED'
6091 | 'PARTIALLY_USED'
6092 | 'FULLY_USED';
6093 };
6094
6095 /**
6096 * Describes the definition of a logical view.
6097 */
6098 type IViewDefinition = {
6099 /**
6100 * Optional. Foreign view representations.
6101 */
6102 foreignDefinitions?: Array<IForeignViewDefinition>;
6103 /**
6104 * Optional. Specifices the privacy policy for the view.
6105 */
6106 privacyPolicy?: IPrivacyPolicy;
6107 /**
6108 * Required. A query that BigQuery executes when the view is referenced.
6109 */
6110 query?: string;
6111 /**
6112 * True if the column names are explicitly specified. For example by using the 'CREATE VIEW v(c1, c2) AS ...' syntax. Can only be set for GoogleSQL views.
6113 */
6114 useExplicitColumnNames?: boolean;
6115 /**
6116 * 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 GoogleSQL: https://cloud.google.com/bigquery/sql-reference/ Queries and views that reference this view must use the same flag value. A wrapper is used here because the default value is True.
6117 */
6118 useLegacySql?: boolean;
6119 /**
6120 * Describes user-defined function resources used in the query.
6121 */
6122 userDefinedFunctionResources?: Array<IUserDefinedFunctionResource>;
6123 };
6124
6125 namespace datasets {
6126 /**
6127 * Deletes the dataset specified by the datasetId value. Before you can delete a dataset, you must delete all its tables, either manually or by specifying deleteContents. Immediately after deletion, you can create another dataset with the same name.
6128 */
6129 type IDeleteParams = {
6130 /**
6131 * If True, delete all the tables in the dataset. If False and the dataset contains tables, the request will fail. Default is False
6132 */
6133 deleteContents?: boolean;
6134 };
6135
6136 /**
6137 * Returns the dataset specified by datasetID.
6138 */
6139 type IGetParams = {
6140 /**
6141 * Optional. Specifies the view that determines which dataset information is returned. By default, metadata and ACL information are returned.
6142 */
6143 datasetView?: 'DATASET_VIEW_UNSPECIFIED' | 'METADATA' | 'ACL' | 'FULL';
6144 };
6145
6146 /**
6147 * Lists all datasets in the specified project to which the user has been granted the READER dataset role.
6148 */
6149 type IListParams = {
6150 /**
6151 * Whether to list all datasets, including hidden ones
6152 */
6153 all?: boolean;
6154 /**
6155 * An expression for filtering the results of the request by label. The syntax is `labels.[:]`. Multiple filters can be ANDed together by connecting with a space. Example: `labels.department:receiving labels.active`. See [Filtering datasets using labels](https://cloud.google.com/bigquery/docs/filtering-labels#filtering_datasets_using_labels) for details.
6156 */
6157 filter?: string;
6158 /**
6159 * The maximum number of results to return in a single response page. Leverage the page tokens to iterate through the entire collection.
6160 */
6161 maxResults?: number;
6162 /**
6163 * Page token, returned by a previous call, to request the next page of results
6164 */
6165 pageToken?: string;
6166 };
6167 }
6168
6169 namespace jobs {
6170 /**
6171 * Requests that a job be cancelled. This call will return immediately, and the client will need to poll for the job status to see if the cancel completed successfully. Cancelled jobs may still incur costs.
6172 */
6173 type ICancelParams = {
6174 /**
6175 * The geographic location of the job. You must specify the location to run the job for the following scenarios: * If the location to run a job is not in the `us` or the `eu` multi-regional location * If the job's location is in a single region (for example, `us-central1`) For more information, see https://cloud.google.com/bigquery/docs/locations#specifying_your_location.
6176 */
6177 location?: string;
6178 };
6179
6180 /**
6181 * Requests the deletion of the metadata of a job. This call returns when the job's metadata is deleted.
6182 */
6183 type IDeleteParams = {
6184 /**
6185 * The geographic location of the job. Required. See details at: https://cloud.google.com/bigquery/docs/locations#specifying_your_location.
6186 */
6187 location?: string;
6188 };
6189
6190 /**
6191 * Returns information about a specific job. Job information is available for a six month period after creation. Requires that you're the person who ran the job, or have the Is Owner project role.
6192 */
6193 type IGetParams = {
6194 /**
6195 * The geographic location of the job. You must specify the location to run the job for the following scenarios: * If the location to run a job is not in the `us` or the `eu` multi-regional location * If the job's location is in a single region (for example, `us-central1`) For more information, see https://cloud.google.com/bigquery/docs/locations#specifying_your_location.
6196 */
6197 location?: string;
6198 };
6199
6200 /**
6201 * RPC to get the results of a query job.
6202 */
6203 type IGetQueryResultsParams = {
6204 /**
6205 * Optional. Output timestamp as usec int64. Default is false.
6206 */
6207 'formatOptions.useInt64Timestamp'?: boolean;
6208 /**
6209 * The geographic location of the job. You must specify the location to run the job for the following scenarios: * If the location to run a job is not in the `us` or the `eu` multi-regional location * If the job's location is in a single region (for example, `us-central1`) For more information, see https://cloud.google.com/bigquery/docs/locations#specifying_your_location.
6210 */
6211 location?: string;
6212 /**
6213 * Maximum number of results to read.
6214 */
6215 maxResults?: number;
6216 /**
6217 * Page token, returned by a previous call, to request the next page of results.
6218 */
6219 pageToken?: string;
6220 /**
6221 * Zero-based index of the starting row.
6222 */
6223 startIndex?: string;
6224 /**
6225 * Optional: Specifies the maximum amount of time, in milliseconds, that the client is willing to wait for the query to complete. By default, this limit is 10 seconds (10,000 milliseconds). If the query is complete, the jobComplete field in the response is true. If the query has not yet completed, jobComplete is false. You can request a longer timeout period in the timeoutMs field. However, the call is not guaranteed to wait for the specified timeout; it typically returns after around 200 seconds (200,000 milliseconds), even if the query is not complete. If jobComplete is false, you can continue to wait for the query to complete by calling the getQueryResults method until the jobComplete field in the getQueryResults response is true.
6226 */
6227 timeoutMs?: number;
6228 };
6229
6230 /**
6231 * Lists all jobs that you started in the specified project. Job information is available for a six month period after creation. The job list is sorted in reverse chronological order, by job creation time. Requires the Can View project role, or the Is Owner project role if you set the allUsers property.
6232 */
6233 type IListParams = {
6234 /**
6235 * Whether to display jobs owned by all users in the project. Default False.
6236 */
6237 allUsers?: boolean;
6238 /**
6239 * Max value for job creation time, in milliseconds since the POSIX epoch. If set, only jobs created before or at this timestamp are returned.
6240 */
6241 maxCreationTime?: string;
6242 /**
6243 * The maximum number of results to return in a single response page. Leverage the page tokens to iterate through the entire collection.
6244 */
6245 maxResults?: number;
6246 /**
6247 * Min value for job creation time, in milliseconds since the POSIX epoch. If set, only jobs created after or at this timestamp are returned.
6248 */
6249 minCreationTime?: string;
6250 /**
6251 * Page token, returned by a previous call, to request the next page of results.
6252 */
6253 pageToken?: string;
6254 /**
6255 * If set, show only child jobs of the specified parent. Otherwise, show all top-level jobs.
6256 */
6257 parentJobId?: string;
6258 /**
6259 * Restrict information returned to a set of selected fields
6260 */
6261 projection?: 'full' | 'minimal';
6262 /**
6263 * Filter for job state
6264 */
6265 stateFilter?: Array<'done' | 'pending' | 'running'>;
6266 };
6267 }
6268
6269 namespace models {
6270 /**
6271 * Lists all models in the specified dataset. Requires the READER dataset role. After retrieving the list of models, you can get information about a particular model by calling the models.get method.
6272 */
6273 type IListParams = {
6274 /**
6275 * The maximum number of results to return in a single response page. Leverage the page tokens to iterate through the entire collection.
6276 */
6277 maxResults?: number;
6278 /**
6279 * Page token, returned by a previous call to request the next page of results
6280 */
6281 pageToken?: string;
6282 };
6283 }
6284
6285 namespace projects {
6286 /**
6287 * RPC to list projects to which the user has been granted any project role. Users of this method are encouraged to consider the [Resource Manager](https://cloud.google.com/resource-manager/docs/) API, which provides the underlying data for this method and has more capabilities.
6288 */
6289 type IListParams = {
6290 /**
6291 * `maxResults` unset returns all results, up to 50 per page. Additionally, the number of projects in a page may be fewer than `maxResults` because projects are retrieved and then filtered to only projects with the BigQuery API enabled.
6292 */
6293 maxResults?: number;
6294 /**
6295 * Page token, returned by a previous call, to request the next page of results. If not present, no further pages are present.
6296 */
6297 pageToken?: string;
6298 };
6299 }
6300
6301 namespace routines {
6302 /**
6303 * Gets the specified routine resource by routine ID.
6304 */
6305 type IGetParams = {
6306 /**
6307 * If set, only the Routine fields in the field mask are returned in the response. If unset, all Routine fields are returned.
6308 */
6309 readMask?: string;
6310 };
6311
6312 /**
6313 * Lists all routines in the specified dataset. Requires the READER dataset role.
6314 */
6315 type IListParams = {
6316 /**
6317 * If set, then only the Routines matching this filter are returned. The supported format is `routineType:{RoutineType}`, where `{RoutineType}` is a RoutineType enum. For example: `routineType:SCALAR_FUNCTION`.
6318 */
6319 filter?: string;
6320 /**
6321 * The maximum number of results to return in a single response page. Leverage the page tokens to iterate through the entire collection.
6322 */
6323 maxResults?: number;
6324 /**
6325 * Page token, returned by a previous call, to request the next page of results
6326 */
6327 pageToken?: string;
6328 /**
6329 * If set, then only the Routine fields in the field mask, as well as project_id, dataset_id and routine_id, are returned in the response. If unset, then the following Routine fields are returned: etag, project_id, dataset_id, routine_id, routine_type, creation_time, last_modified_time, and language.
6330 */
6331 readMask?: string;
6332 };
6333 }
6334
6335 namespace rowAccessPolicies {
6336 /**
6337 * Lists all row access policies on the specified table.
6338 */
6339 type IListParams = {
6340 /**
6341 * The maximum number of results to return in a single response page. Leverage the page tokens to iterate through the entire collection.
6342 */
6343 pageSize?: number;
6344 /**
6345 * Page token, returned by a previous call, to request the next page of results.
6346 */
6347 pageToken?: string;
6348 };
6349 }
6350
6351 namespace tabledata {
6352 /**
6353 * List the content of a table in rows.
6354 */
6355 type IListParams = {
6356 /**
6357 * Optional. Output timestamp as usec int64. Default is false.
6358 */
6359 'formatOptions.useInt64Timestamp'?: boolean;
6360 /**
6361 * Row limit of the table.
6362 */
6363 maxResults?: number;
6364 /**
6365 * To retrieve the next page of table data, set this field to the string provided in the pageToken field of the response body from your previous call to tabledata.list.
6366 */
6367 pageToken?: string;
6368 /**
6369 * Subset of fields to return, supports select into sub fields. Example: selected_fields = "a,e.d.f";
6370 */
6371 selectedFields?: string;
6372 /**
6373 * Start row index of the table.
6374 */
6375 startIndex?: string;
6376 };
6377 }
6378
6379 namespace tables {
6380 /**
6381 * Gets the specified table resource by table ID. This method does not return the data in the table, it only returns the table resource, which describes the structure of this table.
6382 */
6383 type IGetParams = {
6384 /**
6385 * List of table schema fields to return (comma-separated). If unspecified, all fields are returned. A fieldMask cannot be used here because the fields will automatically be converted from camelCase to snake_case and the conversion will fail if there are underscores. Since these are fields in BigQuery table schemas, underscores are allowed.
6386 */
6387 selectedFields?: string;
6388 /**
6389 * Optional. Specifies the view that determines which table information is returned. By default, basic table information and storage statistics (STORAGE_STATS) are returned.
6390 */
6391 view?:
6392 | 'TABLE_METADATA_VIEW_UNSPECIFIED'
6393 | 'BASIC'
6394 | 'STORAGE_STATS'
6395 | 'FULL';
6396 };
6397
6398 /**
6399 * Lists all tables in the specified dataset. Requires the READER dataset role.
6400 */
6401 type IListParams = {
6402 /**
6403 * The maximum number of results to return in a single response page. Leverage the page tokens to iterate through the entire collection.
6404 */
6405 maxResults?: number;
6406 /**
6407 * Page token, returned by a previous call, to request the next page of results
6408 */
6409 pageToken?: string;
6410 };
6411
6412 /**
6413 * Updates information in an existing table. The update method replaces the entire table resource, whereas the patch method only replaces fields that are provided in the submitted table resource. This method supports RFC5789 patch semantics.
6414 */
6415 type IPatchParams = {
6416 /**
6417 * Optional. When true will autodetect schema, else will keep original schema
6418 */
6419 autodetect_schema?: boolean;
6420 };
6421
6422 /**
6423 * Updates information in an existing table. The update method replaces the entire Table resource, whereas the patch method only replaces fields that are provided in the submitted Table resource.
6424 */
6425 type IUpdateParams = {
6426 /**
6427 * Optional. When true will autodetect schema, else will keep original schema
6428 */
6429 autodetect_schema?: boolean;
6430 };
6431 }
6432}
6433
6434export default bigquery;