1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
// This file is @generated by prost-build.
/// BigQuery request and response messages for audit log.
/// Note: `Table.schema` has been deprecated in favor of `Table.schemaJson`.
/// `Table.schema` may continue to be present in your logs during this
/// transition.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuditData {
    /// A job completion event.
    #[prost(message, optional, tag = "17")]
    pub job_completed_event: ::core::option::Option<JobCompletedEvent>,
    /// Information about the table access events.
    #[prost(message, repeated, tag = "19")]
    pub table_data_read_events: ::prost::alloc::vec::Vec<TableDataReadEvent>,
    /// Request data for each BigQuery method.
    #[prost(oneof = "audit_data::Request", tags = "1, 16, 2, 3, 4, 5, 6, 7, 8, 20")]
    pub request: ::core::option::Option<audit_data::Request>,
    /// Response data for each BigQuery method.
    #[prost(oneof = "audit_data::Response", tags = "9, 10, 11, 12, 18, 13, 14, 15, 21")]
    pub response: ::core::option::Option<audit_data::Response>,
}
/// Nested message and enum types in `AuditData`.
pub mod audit_data {
    /// Request data for each BigQuery method.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Request {
        /// Table insert request.
        #[prost(message, tag = "1")]
        TableInsertRequest(super::TableInsertRequest),
        /// Table update request.
        #[prost(message, tag = "16")]
        TableUpdateRequest(super::TableUpdateRequest),
        /// Dataset list request.
        #[prost(message, tag = "2")]
        DatasetListRequest(super::DatasetListRequest),
        /// Dataset insert request.
        #[prost(message, tag = "3")]
        DatasetInsertRequest(super::DatasetInsertRequest),
        /// Dataset update request.
        #[prost(message, tag = "4")]
        DatasetUpdateRequest(super::DatasetUpdateRequest),
        /// Job insert request.
        #[prost(message, tag = "5")]
        JobInsertRequest(super::JobInsertRequest),
        /// Job query request.
        #[prost(message, tag = "6")]
        JobQueryRequest(super::JobQueryRequest),
        /// Job get query results request.
        #[prost(message, tag = "7")]
        JobGetQueryResultsRequest(super::JobGetQueryResultsRequest),
        /// Table data-list request.
        #[prost(message, tag = "8")]
        TableDataListRequest(super::TableDataListRequest),
        /// Iam policy request.
        #[prost(message, tag = "20")]
        SetIamPolicyRequest(
            super::super::super::super::super::iam::v1::SetIamPolicyRequest,
        ),
    }
    /// Response data for each BigQuery method.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Response {
        /// Table insert response.
        #[prost(message, tag = "9")]
        TableInsertResponse(super::TableInsertResponse),
        /// Table update response.
        #[prost(message, tag = "10")]
        TableUpdateResponse(super::TableUpdateResponse),
        /// Dataset insert response.
        #[prost(message, tag = "11")]
        DatasetInsertResponse(super::DatasetInsertResponse),
        /// Dataset update response.
        #[prost(message, tag = "12")]
        DatasetUpdateResponse(super::DatasetUpdateResponse),
        /// Job insert response.
        #[prost(message, tag = "18")]
        JobInsertResponse(super::JobInsertResponse),
        /// Job query response.
        #[prost(message, tag = "13")]
        JobQueryResponse(super::JobQueryResponse),
        /// Job get query results response.
        #[prost(message, tag = "14")]
        JobGetQueryResultsResponse(super::JobGetQueryResultsResponse),
        /// Deprecated: Job query-done response. Use this information for usage
        /// analysis.
        #[prost(message, tag = "15")]
        JobQueryDoneResponse(super::JobQueryDoneResponse),
        /// Iam Policy.
        #[prost(message, tag = "21")]
        PolicyResponse(super::super::super::super::super::iam::v1::Policy),
    }
}
/// Table insert request.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TableInsertRequest {
    /// The new table.
    #[prost(message, optional, tag = "1")]
    pub resource: ::core::option::Option<Table>,
}
/// Table update request.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TableUpdateRequest {
    /// The table to be updated.
    #[prost(message, optional, tag = "1")]
    pub resource: ::core::option::Option<Table>,
}
/// Table insert response.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TableInsertResponse {
    /// Final state of the inserted table.
    #[prost(message, optional, tag = "1")]
    pub resource: ::core::option::Option<Table>,
}
/// Table update response.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TableUpdateResponse {
    /// Final state of the updated table.
    #[prost(message, optional, tag = "1")]
    pub resource: ::core::option::Option<Table>,
}
/// Dataset list request.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DatasetListRequest {
    /// Whether to list all datasets, including hidden ones.
    #[prost(bool, tag = "1")]
    pub list_all: bool,
}
/// Dataset insert request.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DatasetInsertRequest {
    /// The dataset to be inserted.
    #[prost(message, optional, tag = "1")]
    pub resource: ::core::option::Option<Dataset>,
}
/// Dataset insert response.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DatasetInsertResponse {
    /// Final state of the inserted dataset.
    #[prost(message, optional, tag = "1")]
    pub resource: ::core::option::Option<Dataset>,
}
/// Dataset update request.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DatasetUpdateRequest {
    /// The dataset to be updated.
    #[prost(message, optional, tag = "1")]
    pub resource: ::core::option::Option<Dataset>,
}
/// Dataset update response.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DatasetUpdateResponse {
    /// Final state of the updated dataset.
    #[prost(message, optional, tag = "1")]
    pub resource: ::core::option::Option<Dataset>,
}
/// Job insert request.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct JobInsertRequest {
    /// Job insert request.
    #[prost(message, optional, tag = "1")]
    pub resource: ::core::option::Option<Job>,
}
/// Job insert response.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct JobInsertResponse {
    /// Job insert response.
    #[prost(message, optional, tag = "1")]
    pub resource: ::core::option::Option<Job>,
}
/// Job query request.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct JobQueryRequest {
    /// The query.
    #[prost(string, tag = "1")]
    pub query: ::prost::alloc::string::String,
    /// The maximum number of results.
    #[prost(uint32, tag = "2")]
    pub max_results: u32,
    /// The default dataset for tables that do not have a dataset specified.
    #[prost(message, optional, tag = "3")]
    pub default_dataset: ::core::option::Option<DatasetName>,
    /// Project that the query should be charged to.
    #[prost(string, tag = "4")]
    pub project_id: ::prost::alloc::string::String,
    /// If true, don't actually run the job. Just check that it would run.
    #[prost(bool, tag = "5")]
    pub dry_run: bool,
}
/// Job query response.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct JobQueryResponse {
    /// The total number of rows in the full query result set.
    #[prost(uint64, tag = "1")]
    pub total_results: u64,
    /// Information about the queried job.
    #[prost(message, optional, tag = "2")]
    pub job: ::core::option::Option<Job>,
}
/// Job getQueryResults request.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct JobGetQueryResultsRequest {
    /// Maximum number of results to return.
    #[prost(uint32, tag = "1")]
    pub max_results: u32,
    /// Zero-based row number at which to start.
    #[prost(uint64, tag = "2")]
    pub start_row: u64,
}
/// Job getQueryResults response.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct JobGetQueryResultsResponse {
    /// Total number of results in query results.
    #[prost(uint64, tag = "1")]
    pub total_results: u64,
    /// The job that was created to run the query.
    /// It completed if `job.status.state` is `DONE`.
    /// It failed if `job.status.errorResult` is also present.
    #[prost(message, optional, tag = "2")]
    pub job: ::core::option::Option<Job>,
}
/// Job getQueryDone response.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct JobQueryDoneResponse {
    /// The job and status information.
    /// The job completed if `job.status.state` is `DONE`.
    #[prost(message, optional, tag = "1")]
    pub job: ::core::option::Option<Job>,
}
/// Query job completed event.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct JobCompletedEvent {
    /// Name of the event.
    #[prost(string, tag = "1")]
    pub event_name: ::prost::alloc::string::String,
    /// Job information.
    #[prost(message, optional, tag = "2")]
    pub job: ::core::option::Option<Job>,
}
/// Table data read event. Only present for tables, not views, and is only
/// included in the log record for the project that owns the table.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TableDataReadEvent {
    /// Name of the accessed table.
    #[prost(message, optional, tag = "1")]
    pub table_name: ::core::option::Option<TableName>,
    /// A list of referenced fields. This information is not included by default.
    /// To enable this in the logs, please contact BigQuery support or open a bug
    /// in the BigQuery issue tracker.
    #[prost(string, repeated, tag = "2")]
    pub referenced_fields: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Table data-list request.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TableDataListRequest {
    /// Starting row offset.
    #[prost(uint64, tag = "1")]
    pub start_row: u64,
    /// Maximum number of results to return.
    #[prost(uint32, tag = "2")]
    pub max_results: u32,
}
/// Describes a BigQuery table.
/// See the [Table](/bigquery/docs/reference/v2/tables) API resource
/// for more details on individual fields.
/// Note: `Table.schema` has been deprecated in favor of `Table.schemaJson`.
/// `Table.schema` may continue to be present in your logs during this
/// transition.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Table {
    /// The name of the table.
    #[prost(message, optional, tag = "1")]
    pub table_name: ::core::option::Option<TableName>,
    /// User-provided metadata for the table.
    #[prost(message, optional, tag = "2")]
    pub info: ::core::option::Option<TableInfo>,
    /// A JSON representation of the table's schema.
    #[prost(string, tag = "8")]
    pub schema_json: ::prost::alloc::string::String,
    /// If present, this is a virtual table defined by a SQL query.
    #[prost(message, optional, tag = "4")]
    pub view: ::core::option::Option<TableViewDefinition>,
    /// The expiration date for the table, after which the table
    /// is deleted and the storage reclaimed.
    /// If not present, the table persists indefinitely.
    #[prost(message, optional, tag = "5")]
    pub expire_time: ::core::option::Option<::prost_types::Timestamp>,
    /// The time the table was created.
    #[prost(message, optional, tag = "6")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// The time the table was last truncated
    /// by an operation with a `writeDisposition` of `WRITE_TRUNCATE`.
    #[prost(message, optional, tag = "7")]
    pub truncate_time: ::core::option::Option<::prost_types::Timestamp>,
    /// The time the table was last modified.
    #[prost(message, optional, tag = "9")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// The table encryption information. Set when non-default encryption is used.
    #[prost(message, optional, tag = "10")]
    pub encryption: ::core::option::Option<EncryptionInfo>,
}
/// User-provided metadata for a table.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TableInfo {
    /// A short name for the table, such as`"Analytics Data - Jan 2011"`.
    #[prost(string, tag = "1")]
    pub friendly_name: ::prost::alloc::string::String,
    /// A long description, perhaps several paragraphs,
    /// describing the table contents in detail.
    #[prost(string, tag = "2")]
    pub description: ::prost::alloc::string::String,
    /// Labels provided for the table.
    #[prost(btree_map = "string, string", tag = "3")]
    pub labels: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
}
/// Describes a virtual table defined by a SQL query.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TableViewDefinition {
    /// SQL query defining the view.
    #[prost(string, tag = "1")]
    pub query: ::prost::alloc::string::String,
}
/// BigQuery dataset information.
/// See the [Dataset](/bigquery/docs/reference/v2/datasets) API resource
/// for more details on individual fields.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Dataset {
    /// The name of the dataset.
    #[prost(message, optional, tag = "1")]
    pub dataset_name: ::core::option::Option<DatasetName>,
    /// User-provided metadata for the dataset.
    #[prost(message, optional, tag = "2")]
    pub info: ::core::option::Option<DatasetInfo>,
    /// The time the dataset was created.
    #[prost(message, optional, tag = "4")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// The time the dataset was last modified.
    #[prost(message, optional, tag = "5")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// The access control list for the dataset.
    #[prost(message, optional, tag = "6")]
    pub acl: ::core::option::Option<BigQueryAcl>,
    /// If this field is present, each table that does not specify an
    /// expiration time is assigned an expiration time by adding this
    /// duration to the table's `createTime`.  If this field is empty,
    /// there is no default table expiration time.
    #[prost(message, optional, tag = "8")]
    pub default_table_expire_duration: ::core::option::Option<::prost_types::Duration>,
}
/// User-provided metadata for a dataset.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DatasetInfo {
    /// A short name for the dataset, such as`"Analytics Data 2011"`.
    #[prost(string, tag = "1")]
    pub friendly_name: ::prost::alloc::string::String,
    /// A long description, perhaps several paragraphs,
    /// describing the dataset contents in detail.
    #[prost(string, tag = "2")]
    pub description: ::prost::alloc::string::String,
    /// Labels provided for the dataset.
    #[prost(btree_map = "string, string", tag = "3")]
    pub labels: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
}
/// An access control list.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BigQueryAcl {
    /// Access control entry list.
    #[prost(message, repeated, tag = "1")]
    pub entries: ::prost::alloc::vec::Vec<big_query_acl::Entry>,
}
/// Nested message and enum types in `BigQueryAcl`.
pub mod big_query_acl {
    /// Access control entry.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Entry {
        /// The granted role, which can be `READER`, `WRITER`, or `OWNER`.
        #[prost(string, tag = "1")]
        pub role: ::prost::alloc::string::String,
        /// Grants access to a group identified by an email address.
        #[prost(string, tag = "2")]
        pub group_email: ::prost::alloc::string::String,
        /// Grants access to a user identified by an email address.
        #[prost(string, tag = "3")]
        pub user_email: ::prost::alloc::string::String,
        /// Grants access to all members of a domain.
        #[prost(string, tag = "4")]
        pub domain: ::prost::alloc::string::String,
        /// Grants access to special groups. Valid groups are `PROJECT_OWNERS`,
        /// `PROJECT_READERS`, `PROJECT_WRITERS` and `ALL_AUTHENTICATED_USERS`.
        #[prost(string, tag = "5")]
        pub special_group: ::prost::alloc::string::String,
        /// Grants access to a BigQuery View.
        #[prost(message, optional, tag = "6")]
        pub view_name: ::core::option::Option<super::TableName>,
    }
}
/// Describes a job.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Job {
    /// Job name.
    #[prost(message, optional, tag = "1")]
    pub job_name: ::core::option::Option<JobName>,
    /// Job configuration.
    #[prost(message, optional, tag = "2")]
    pub job_configuration: ::core::option::Option<JobConfiguration>,
    /// Job status.
    #[prost(message, optional, tag = "3")]
    pub job_status: ::core::option::Option<JobStatus>,
    /// Job statistics.
    #[prost(message, optional, tag = "4")]
    pub job_statistics: ::core::option::Option<JobStatistics>,
}
/// Job configuration information.
/// See the [Jobs](/bigquery/docs/reference/v2/jobs) API resource
/// for more details on individual fields.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct JobConfiguration {
    /// If true, don't actually run the job. Just check that it would run.
    #[prost(bool, tag = "9")]
    pub dry_run: bool,
    /// Labels provided for the job.
    #[prost(btree_map = "string, string", tag = "3")]
    pub labels: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Job configuration information.
    #[prost(oneof = "job_configuration::Configuration", tags = "5, 6, 7, 8")]
    pub configuration: ::core::option::Option<job_configuration::Configuration>,
}
/// Nested message and enum types in `JobConfiguration`.
pub mod job_configuration {
    /// Describes a query job, which executes a SQL-like query.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Query {
        /// The SQL query to run.
        #[prost(string, tag = "1")]
        pub query: ::prost::alloc::string::String,
        /// The table where results are written.
        #[prost(message, optional, tag = "2")]
        pub destination_table: ::core::option::Option<super::TableName>,
        /// Describes when a job is allowed to create a table:
        /// `CREATE_IF_NEEDED`, `CREATE_NEVER`.
        #[prost(string, tag = "3")]
        pub create_disposition: ::prost::alloc::string::String,
        /// Describes how writes affect existing tables:
        /// `WRITE_TRUNCATE`, `WRITE_APPEND`, `WRITE_EMPTY`.
        #[prost(string, tag = "4")]
        pub write_disposition: ::prost::alloc::string::String,
        /// If a table name is specified without a dataset in a query,
        /// this dataset will be added to table name.
        #[prost(message, optional, tag = "5")]
        pub default_dataset: ::core::option::Option<super::DatasetName>,
        /// Describes data sources outside BigQuery, if needed.
        #[prost(message, repeated, tag = "6")]
        pub table_definitions: ::prost::alloc::vec::Vec<super::TableDefinition>,
        /// Describes the priority given to the query:
        /// `QUERY_INTERACTIVE` or `QUERY_BATCH`.
        #[prost(string, tag = "7")]
        pub query_priority: ::prost::alloc::string::String,
        /// Result table encryption information. Set when non-default encryption is
        /// used.
        #[prost(message, optional, tag = "8")]
        pub destination_table_encryption: ::core::option::Option<super::EncryptionInfo>,
        /// Type of the statement (e.g. SELECT, INSERT, CREATE_TABLE, CREATE_MODEL..)
        #[prost(string, tag = "9")]
        pub statement_type: ::prost::alloc::string::String,
    }
    /// Describes a load job, which loads data from an external source via
    /// the  import pipeline.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Load {
        /// URIs for the data to be imported. Only Google Cloud Storage URIs are
        /// supported.
        #[prost(string, repeated, tag = "1")]
        pub source_uris: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
        /// The table schema in JSON format representation of a TableSchema.
        #[prost(string, tag = "6")]
        pub schema_json: ::prost::alloc::string::String,
        /// The table where the imported data is written.
        #[prost(message, optional, tag = "3")]
        pub destination_table: ::core::option::Option<super::TableName>,
        /// Describes when a job is allowed to create a table:
        /// `CREATE_IF_NEEDED`, `CREATE_NEVER`.
        #[prost(string, tag = "4")]
        pub create_disposition: ::prost::alloc::string::String,
        /// Describes how writes affect existing tables:
        /// `WRITE_TRUNCATE`, `WRITE_APPEND`, `WRITE_EMPTY`.
        #[prost(string, tag = "5")]
        pub write_disposition: ::prost::alloc::string::String,
        /// Result table encryption information. Set when non-default encryption is
        /// used.
        #[prost(message, optional, tag = "7")]
        pub destination_table_encryption: ::core::option::Option<super::EncryptionInfo>,
    }
    /// Describes an extract job, which exports data to an external source
    /// via the  export pipeline.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Extract {
        /// Google Cloud Storage URIs where extracted data should be written.
        #[prost(string, repeated, tag = "1")]
        pub destination_uris: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
        /// The source table.
        #[prost(message, optional, tag = "2")]
        pub source_table: ::core::option::Option<super::TableName>,
    }
    /// Describes a copy job, which copies an existing table to another table.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct TableCopy {
        /// Source tables.
        #[prost(message, repeated, tag = "1")]
        pub source_tables: ::prost::alloc::vec::Vec<super::TableName>,
        /// Destination table.
        #[prost(message, optional, tag = "2")]
        pub destination_table: ::core::option::Option<super::TableName>,
        /// Describes when a job is allowed to create a table:
        /// `CREATE_IF_NEEDED`, `CREATE_NEVER`.
        #[prost(string, tag = "3")]
        pub create_disposition: ::prost::alloc::string::String,
        /// Describes how writes affect existing tables:
        /// `WRITE_TRUNCATE`, `WRITE_APPEND`, `WRITE_EMPTY`.
        #[prost(string, tag = "4")]
        pub write_disposition: ::prost::alloc::string::String,
        /// Result table encryption information. Set when non-default encryption is
        /// used.
        #[prost(message, optional, tag = "5")]
        pub destination_table_encryption: ::core::option::Option<super::EncryptionInfo>,
    }
    /// Job configuration information.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Configuration {
        /// Query job information.
        #[prost(message, tag = "5")]
        Query(Query),
        /// Load job information.
        #[prost(message, tag = "6")]
        Load(Load),
        /// Extract job information.
        #[prost(message, tag = "7")]
        Extract(Extract),
        /// TableCopy job information.
        #[prost(message, tag = "8")]
        TableCopy(TableCopy),
    }
}
/// Describes an external data source used in a query.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TableDefinition {
    /// Name of the table, used in queries.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Google Cloud Storage URIs for the data to be imported.
    #[prost(string, repeated, tag = "2")]
    pub source_uris: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Running state of a job.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct JobStatus {
    /// State of a job: `PENDING`, `RUNNING`, or `DONE`.
    #[prost(string, tag = "1")]
    pub state: ::prost::alloc::string::String,
    /// If the job did not complete successfully, this field describes why.
    #[prost(message, optional, tag = "2")]
    pub error: ::core::option::Option<super::super::super::super::rpc::Status>,
    /// Errors encountered during the running of the job. Do not necessarily mean
    /// that the job has completed or was unsuccessful.
    #[prost(message, repeated, tag = "3")]
    pub additional_errors: ::prost::alloc::vec::Vec<
        super::super::super::super::rpc::Status,
    >,
}
/// Job statistics that may change after a job starts.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct JobStatistics {
    /// Time when the job was created.
    #[prost(message, optional, tag = "1")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Time when the job started.
    #[prost(message, optional, tag = "2")]
    pub start_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Time when the job ended.
    #[prost(message, optional, tag = "3")]
    pub end_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Total bytes processed for a job.
    #[prost(int64, tag = "4")]
    pub total_processed_bytes: i64,
    /// Processed bytes, adjusted by the job's CPU usage.
    #[prost(int64, tag = "5")]
    pub total_billed_bytes: i64,
    /// The tier assigned by CPU-based billing.
    #[prost(int32, tag = "7")]
    pub billing_tier: i32,
    /// The total number of slot-ms consumed by the query job.
    #[prost(int64, tag = "8")]
    pub total_slot_ms: i64,
    /// Reservation usage. This field reported misleading information and will
    /// no longer be populated. Aggregate usage of all jobs submitted to a
    /// reservation should provide a more reliable indicator of reservation
    /// imbalance.
    #[deprecated]
    #[prost(message, repeated, tag = "14")]
    pub reservation_usage: ::prost::alloc::vec::Vec<
        job_statistics::ReservationResourceUsage,
    >,
    /// Reservation name or "unreserved" for on-demand resource usage.
    #[prost(string, tag = "16")]
    pub reservation: ::prost::alloc::string::String,
    /// The first N tables accessed by the query job. Older queries that
    /// reference a large number of tables may not have all of their
    /// tables in this list. You can use the total_tables_processed count to
    /// know how many total tables were read in the query. For new queries,
    /// there is currently no limit.
    #[prost(message, repeated, tag = "9")]
    pub referenced_tables: ::prost::alloc::vec::Vec<TableName>,
    /// Total number of unique tables referenced in the query.
    #[prost(int32, tag = "10")]
    pub total_tables_processed: i32,
    /// The first N views accessed by the query job. Older queries that
    /// reference a large number of views may not have all of their
    /// views in this list. You can use the total_tables_processed count to
    /// know how many total tables were read in the query. For new queries,
    /// there is currently no limit.
    #[prost(message, repeated, tag = "11")]
    pub referenced_views: ::prost::alloc::vec::Vec<TableName>,
    /// Total number of unique views referenced in the query.
    #[prost(int32, tag = "12")]
    pub total_views_processed: i32,
    /// Number of output rows produced by the query job.
    #[prost(int64, tag = "15")]
    pub query_output_row_count: i64,
    /// Total bytes loaded for an import job.
    #[prost(int64, tag = "13")]
    pub total_load_output_bytes: i64,
}
/// Nested message and enum types in `JobStatistics`.
pub mod job_statistics {
    /// Job resource usage breakdown by reservation.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct ReservationResourceUsage {
        /// Reservation name or "unreserved" for on-demand resources usage.
        #[prost(string, tag = "1")]
        pub name: ::prost::alloc::string::String,
        /// Total slot milliseconds used by the reservation for a particular job.
        #[prost(int64, tag = "2")]
        pub slot_ms: i64,
    }
}
/// The fully-qualified name for a dataset.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DatasetName {
    /// The project ID.
    #[prost(string, tag = "1")]
    pub project_id: ::prost::alloc::string::String,
    /// The dataset ID within the project.
    #[prost(string, tag = "2")]
    pub dataset_id: ::prost::alloc::string::String,
}
/// The fully-qualified name for a table.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TableName {
    /// The project ID.
    #[prost(string, tag = "1")]
    pub project_id: ::prost::alloc::string::String,
    /// The dataset ID within the project.
    #[prost(string, tag = "2")]
    pub dataset_id: ::prost::alloc::string::String,
    /// The table ID of the table within the dataset.
    #[prost(string, tag = "3")]
    pub table_id: ::prost::alloc::string::String,
}
/// The fully-qualified name for a job.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct JobName {
    /// The project ID.
    #[prost(string, tag = "1")]
    pub project_id: ::prost::alloc::string::String,
    /// The job ID within the project.
    #[prost(string, tag = "2")]
    pub job_id: ::prost::alloc::string::String,
    /// The job location.
    #[prost(string, tag = "3")]
    pub location: ::prost::alloc::string::String,
}
/// Describes encryption properties for a table or a job
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EncryptionInfo {
    /// unique identifier for cloud kms key
    #[prost(string, tag = "1")]
    pub kms_key_name: ::prost::alloc::string::String,
}