• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1"""Generated message classes for bigquery version v2.
2
3A data platform for customers to create, manage, share and query data.
4"""
5# NOTE: This file is autogenerated and should not be edited by hand.
6
7from __future__ import absolute_import
8
9from apitools.base.protorpclite import messages as _messages
10from apitools.base.py import encoding
11from apitools.base.py import extra_types
12
13
14package = 'bigquery'
15
16
17class BigqueryDatasetsDeleteRequest(_messages.Message):
18  r"""A BigqueryDatasetsDeleteRequest object.
19
20  Fields:
21    datasetId: Dataset ID of dataset being deleted
22    deleteContents: If True, delete all the tables in the dataset. If False
23      and the dataset contains tables, the request will fail. Default is False
24    projectId: Project ID of the dataset being deleted
25  """
26
27  datasetId = _messages.StringField(1, required=True)
28  deleteContents = _messages.BooleanField(2)
29  projectId = _messages.StringField(3, required=True)
30
31
32class BigqueryDatasetsDeleteResponse(_messages.Message):
33  r"""An empty BigqueryDatasetsDelete response."""
34
35
36class BigqueryDatasetsGetRequest(_messages.Message):
37  r"""A BigqueryDatasetsGetRequest object.
38
39  Fields:
40    datasetId: Dataset ID of the requested dataset
41    projectId: Project ID of the requested dataset
42  """
43
44  datasetId = _messages.StringField(1, required=True)
45  projectId = _messages.StringField(2, required=True)
46
47
48class BigqueryDatasetsInsertRequest(_messages.Message):
49  r"""A BigqueryDatasetsInsertRequest object.
50
51  Fields:
52    dataset: A Dataset resource to be passed as the request body.
53    projectId: Project ID of the new dataset
54  """
55
56  dataset = _messages.MessageField('Dataset', 1)
57  projectId = _messages.StringField(2, required=True)
58
59
60class BigqueryDatasetsListRequest(_messages.Message):
61  r"""A BigqueryDatasetsListRequest object.
62
63  Fields:
64    all: Whether to list all datasets, including hidden ones
65    filter: An expression for filtering the results of the request by label.
66      The syntax is "labels.[:]". Multiple filters can be ANDed together by
67      connecting with a space. Example: "labels.department:receiving
68      labels.active". See https://cloud.google.com/bigquery/docs/labeling-
69      datasets#filtering_datasets_using_labels for details.
70    maxResults: The maximum number of results to return
71    pageToken: Page token, returned by a previous call, to request the next
72      page of results
73    projectId: Project ID of the datasets to be listed
74  """
75
76  all = _messages.BooleanField(1)
77  filter = _messages.StringField(2)
78  maxResults = _messages.IntegerField(3, variant=_messages.Variant.UINT32)
79  pageToken = _messages.StringField(4)
80  projectId = _messages.StringField(5, required=True)
81
82
83class BigqueryDatasetsPatchRequest(_messages.Message):
84  r"""A BigqueryDatasetsPatchRequest object.
85
86  Fields:
87    dataset: A Dataset resource to be passed as the request body.
88    datasetId: Dataset ID of the dataset being updated
89    projectId: Project ID of the dataset being updated
90  """
91
92  dataset = _messages.MessageField('Dataset', 1)
93  datasetId = _messages.StringField(2, required=True)
94  projectId = _messages.StringField(3, required=True)
95
96
97class BigqueryDatasetsUpdateRequest(_messages.Message):
98  r"""A BigqueryDatasetsUpdateRequest object.
99
100  Fields:
101    dataset: A Dataset resource to be passed as the request body.
102    datasetId: Dataset ID of the dataset being updated
103    projectId: Project ID of the dataset being updated
104  """
105
106  dataset = _messages.MessageField('Dataset', 1)
107  datasetId = _messages.StringField(2, required=True)
108  projectId = _messages.StringField(3, required=True)
109
110
111class BigqueryJobsCancelRequest(_messages.Message):
112  r"""A BigqueryJobsCancelRequest object.
113
114  Fields:
115    jobId: [Required] Job ID of the job to cancel
116    projectId: [Required] Project ID of the job to cancel
117  """
118
119  jobId = _messages.StringField(1, required=True)
120  projectId = _messages.StringField(2, required=True)
121
122
123class BigqueryJobsGetQueryResultsRequest(_messages.Message):
124  r"""A BigqueryJobsGetQueryResultsRequest object.
125
126  Fields:
127    jobId: [Required] Job ID of the query job
128    maxResults: Maximum number of results to read
129    pageToken: Page token, returned by a previous call, to request the next
130      page of results
131    projectId: [Required] Project ID of the query job
132    startIndex: Zero-based index of the starting row
133    timeoutMs: How long to wait for the query to complete, in milliseconds,
134      before returning. Default is 10 seconds. If the timeout passes before
135      the job completes, the 'jobComplete' field in the response will be false
136  """
137
138  jobId = _messages.StringField(1, required=True)
139  maxResults = _messages.IntegerField(2, variant=_messages.Variant.UINT32)
140  pageToken = _messages.StringField(3)
141  projectId = _messages.StringField(4, required=True)
142  startIndex = _messages.IntegerField(5, variant=_messages.Variant.UINT64)
143  timeoutMs = _messages.IntegerField(6, variant=_messages.Variant.UINT32)
144
145
146class BigqueryJobsGetRequest(_messages.Message):
147  r"""A BigqueryJobsGetRequest object.
148
149  Fields:
150    jobId: [Required] Job ID of the requested job
151    projectId: [Required] Project ID of the requested job
152  """
153
154  jobId = _messages.StringField(1, required=True)
155  projectId = _messages.StringField(2, required=True)
156
157
158class BigqueryJobsInsertRequest(_messages.Message):
159  r"""A BigqueryJobsInsertRequest object.
160
161  Fields:
162    job: A Job resource to be passed as the request body.
163    projectId: Project ID of the project that will be billed for the job
164  """
165
166  job = _messages.MessageField('Job', 1)
167  projectId = _messages.StringField(2, required=True)
168
169
170class BigqueryJobsListRequest(_messages.Message):
171  r"""A BigqueryJobsListRequest object.
172
173  Enums:
174    ProjectionValueValuesEnum: Restrict information returned to a set of
175      selected fields
176    StateFilterValueValuesEnum: Filter for job state
177
178  Fields:
179    allUsers: Whether to display jobs owned by all users in the project.
180      Default false
181    maxResults: Maximum number of results to return
182    pageToken: Page token, returned by a previous call, to request the next
183      page of results
184    projectId: Project ID of the jobs to list
185    projection: Restrict information returned to a set of selected fields
186    stateFilter: Filter for job state
187  """
188
189  class ProjectionValueValuesEnum(_messages.Enum):
190    r"""Restrict information returned to a set of selected fields
191
192    Values:
193      full: Includes all job data
194      minimal: Does not include the job configuration
195    """
196    full = 0
197    minimal = 1
198
199  class StateFilterValueValuesEnum(_messages.Enum):
200    r"""Filter for job state
201
202    Values:
203      done: Finished jobs
204      pending: Pending jobs
205      running: Running jobs
206    """
207    done = 0
208    pending = 1
209    running = 2
210
211  allUsers = _messages.BooleanField(1)
212  maxResults = _messages.IntegerField(2, variant=_messages.Variant.UINT32)
213  pageToken = _messages.StringField(3)
214  projectId = _messages.StringField(4, required=True)
215  projection = _messages.EnumField('ProjectionValueValuesEnum', 5)
216  stateFilter = _messages.EnumField('StateFilterValueValuesEnum', 6, repeated=True)
217
218
219class BigqueryJobsQueryRequest(_messages.Message):
220  r"""A BigqueryJobsQueryRequest object.
221
222  Fields:
223    projectId: Project ID of the project billed for the query
224    queryRequest: A QueryRequest resource to be passed as the request body.
225  """
226
227  projectId = _messages.StringField(1, required=True)
228  queryRequest = _messages.MessageField('QueryRequest', 2)
229
230
231class BigqueryProjectsListRequest(_messages.Message):
232  r"""A BigqueryProjectsListRequest object.
233
234  Fields:
235    maxResults: Maximum number of results to return
236    pageToken: Page token, returned by a previous call, to request the next
237      page of results
238  """
239
240  maxResults = _messages.IntegerField(1, variant=_messages.Variant.UINT32)
241  pageToken = _messages.StringField(2)
242
243
244class BigqueryTabledataInsertAllRequest(_messages.Message):
245  r"""A BigqueryTabledataInsertAllRequest object.
246
247  Fields:
248    datasetId: Dataset ID of the destination table.
249    projectId: Project ID of the destination table.
250    tableDataInsertAllRequest: A TableDataInsertAllRequest resource to be
251      passed as the request body.
252    tableId: Table ID of the destination table.
253  """
254
255  datasetId = _messages.StringField(1, required=True)
256  projectId = _messages.StringField(2, required=True)
257  tableDataInsertAllRequest = _messages.MessageField('TableDataInsertAllRequest', 3)
258  tableId = _messages.StringField(4, required=True)
259
260
261class BigqueryTabledataListRequest(_messages.Message):
262  r"""A BigqueryTabledataListRequest object.
263
264  Fields:
265    datasetId: Dataset ID of the table to read
266    maxResults: Maximum number of results to return
267    pageToken: Page token, returned by a previous call, identifying the result
268      set
269    projectId: Project ID of the table to read
270    startIndex: Zero-based index of the starting row to read
271    tableId: Table ID of the table to read
272  """
273
274  datasetId = _messages.StringField(1, required=True)
275  maxResults = _messages.IntegerField(2, variant=_messages.Variant.UINT32)
276  pageToken = _messages.StringField(3)
277  projectId = _messages.StringField(4, required=True)
278  startIndex = _messages.IntegerField(5, variant=_messages.Variant.UINT64)
279  tableId = _messages.StringField(6, required=True)
280
281
282class BigqueryTablesDeleteRequest(_messages.Message):
283  r"""A BigqueryTablesDeleteRequest object.
284
285  Fields:
286    datasetId: Dataset ID of the table to delete
287    projectId: Project ID of the table to delete
288    tableId: Table ID of the table to delete
289  """
290
291  datasetId = _messages.StringField(1, required=True)
292  projectId = _messages.StringField(2, required=True)
293  tableId = _messages.StringField(3, required=True)
294
295
296class BigqueryTablesDeleteResponse(_messages.Message):
297  r"""An empty BigqueryTablesDelete response."""
298
299
300class BigqueryTablesGetRequest(_messages.Message):
301  r"""A BigqueryTablesGetRequest object.
302
303  Fields:
304    datasetId: Dataset ID of the requested table
305    projectId: Project ID of the requested table
306    tableId: Table ID of the requested table
307  """
308
309  datasetId = _messages.StringField(1, required=True)
310  projectId = _messages.StringField(2, required=True)
311  tableId = _messages.StringField(3, required=True)
312
313
314class BigqueryTablesInsertRequest(_messages.Message):
315  r"""A BigqueryTablesInsertRequest object.
316
317  Fields:
318    datasetId: Dataset ID of the new table
319    projectId: Project ID of the new table
320    table: A Table resource to be passed as the request body.
321  """
322
323  datasetId = _messages.StringField(1, required=True)
324  projectId = _messages.StringField(2, required=True)
325  table = _messages.MessageField('Table', 3)
326
327
328class BigqueryTablesListRequest(_messages.Message):
329  r"""A BigqueryTablesListRequest object.
330
331  Fields:
332    datasetId: Dataset ID of the tables to list
333    maxResults: Maximum number of results to return
334    pageToken: Page token, returned by a previous call, to request the next
335      page of results
336    projectId: Project ID of the tables to list
337  """
338
339  datasetId = _messages.StringField(1, required=True)
340  maxResults = _messages.IntegerField(2, variant=_messages.Variant.UINT32)
341  pageToken = _messages.StringField(3)
342  projectId = _messages.StringField(4, required=True)
343
344
345class BigqueryTablesPatchRequest(_messages.Message):
346  r"""A BigqueryTablesPatchRequest object.
347
348  Fields:
349    datasetId: Dataset ID of the table to update
350    projectId: Project ID of the table to update
351    table: A Table resource to be passed as the request body.
352    tableId: Table ID of the table to update
353  """
354
355  datasetId = _messages.StringField(1, required=True)
356  projectId = _messages.StringField(2, required=True)
357  table = _messages.MessageField('Table', 3)
358  tableId = _messages.StringField(4, required=True)
359
360
361class BigqueryTablesUpdateRequest(_messages.Message):
362  r"""A BigqueryTablesUpdateRequest object.
363
364  Fields:
365    datasetId: Dataset ID of the table to update
366    projectId: Project ID of the table to update
367    table: A Table resource to be passed as the request body.
368    tableId: Table ID of the table to update
369  """
370
371  datasetId = _messages.StringField(1, required=True)
372  projectId = _messages.StringField(2, required=True)
373  table = _messages.MessageField('Table', 3)
374  tableId = _messages.StringField(4, required=True)
375
376
377class BigtableColumn(_messages.Message):
378  r"""A BigtableColumn object.
379
380  Fields:
381    encoding: [Optional] The encoding of the values when the type is not
382      STRING. Acceptable encoding values are: TEXT - indicates values are
383      alphanumeric text strings. BINARY - indicates values are encoded using
384      HBase Bytes.toBytes family of functions. 'encoding' can also be set at
385      the column family level. However, the setting at this level takes
386      precedence if 'encoding' is set at both levels.
387    fieldName: [Optional] If the qualifier is not a valid BigQuery field
388      identifier i.e. does not match [a-zA-Z][a-zA-Z0-9_]*, a valid identifier
389      must be provided as the column field name and is used as field name in
390      queries.
391    onlyReadLatest: [Optional] If this is set, only the latest version of
392      value in this column are exposed. 'onlyReadLatest' can also be set at
393      the column family level. However, the setting at this level takes
394      precedence if 'onlyReadLatest' is set at both levels.
395    qualifierEncoded: [Required] Qualifier of the column. Columns in the
396      parent column family that has this exact qualifier are exposed as .
397      field. If the qualifier is valid UTF-8 string, it can be specified in
398      the qualifier_string field. Otherwise, a base-64 encoded value must be
399      set to qualifier_encoded. The column field name is the same as the
400      column qualifier. However, if the qualifier is not a valid BigQuery
401      field identifier i.e. does not match [a-zA-Z][a-zA-Z0-9_]*, a valid
402      identifier must be provided as field_name.
403    qualifierString: A string attribute.
404    type: [Optional] The type to convert the value in cells of this column.
405      The values are expected to be encoded using HBase Bytes.toBytes function
406      when using the BINARY encoding value. Following BigQuery types are
407      allowed (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Default
408      type is BYTES. 'type' can also be set at the column family level.
409      However, the setting at this level takes precedence if 'type' is set at
410      both levels.
411  """
412
413  encoding = _messages.StringField(1)
414  fieldName = _messages.StringField(2)
415  onlyReadLatest = _messages.BooleanField(3)
416  qualifierEncoded = _messages.BytesField(4)
417  qualifierString = _messages.StringField(5)
418  type = _messages.StringField(6)
419
420
421class BigtableColumnFamily(_messages.Message):
422  r"""A BigtableColumnFamily object.
423
424  Fields:
425    columns: [Optional] Lists of columns that should be exposed as individual
426      fields as opposed to a list of (column name, value) pairs. All columns
427      whose qualifier matches a qualifier in this list can be accessed as ..
428      Other columns can be accessed as a list through .Column field.
429    encoding: [Optional] The encoding of the values when the type is not
430      STRING. Acceptable encoding values are: TEXT - indicates values are
431      alphanumeric text strings. BINARY - indicates values are encoded using
432      HBase Bytes.toBytes family of functions. This can be overridden for a
433      specific column by listing that column in 'columns' and specifying an
434      encoding for it.
435    familyId: Identifier of the column family.
436    onlyReadLatest: [Optional] If this is set only the latest version of value
437      are exposed for all columns in this column family. This can be
438      overridden for a specific column by listing that column in 'columns' and
439      specifying a different setting for that column.
440    type: [Optional] The type to convert the value in cells of this column
441      family. The values are expected to be encoded using HBase Bytes.toBytes
442      function when using the BINARY encoding value. Following BigQuery types
443      are allowed (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN
444      Default type is BYTES. This can be overridden for a specific column by
445      listing that column in 'columns' and specifying a type for it.
446  """
447
448  columns = _messages.MessageField('BigtableColumn', 1, repeated=True)
449  encoding = _messages.StringField(2)
450  familyId = _messages.StringField(3)
451  onlyReadLatest = _messages.BooleanField(4)
452  type = _messages.StringField(5)
453
454
455class BigtableOptions(_messages.Message):
456  r"""A BigtableOptions object.
457
458  Fields:
459    columnFamilies: [Optional] List of column families to expose in the table
460      schema along with their types. This list restricts the column families
461      that can be referenced in queries and specifies their value types. You
462      can use this list to do type conversions - see the 'type' field for more
463      details. If you leave this list empty, all column families are present
464      in the table schema and their values are read as BYTES. During a query
465      only the column families referenced in that query are read from
466      Bigtable.
467    ignoreUnspecifiedColumnFamilies: [Optional] If field is true, then the
468      column families that are not specified in columnFamilies list are not
469      exposed in the table schema. Otherwise, they are read with BYTES type
470      values. The default value is false.
471    readRowkeyAsString: [Optional] If field is true, then the rowkey column
472      families will be read and converted to string. Otherwise they are read
473      with BYTES type values and users need to manually cast them with CAST if
474      necessary. The default value is false.
475  """
476
477  columnFamilies = _messages.MessageField('BigtableColumnFamily', 1, repeated=True)
478  ignoreUnspecifiedColumnFamilies = _messages.BooleanField(2)
479  readRowkeyAsString = _messages.BooleanField(3)
480
481
482class CsvOptions(_messages.Message):
483  r"""A CsvOptions object.
484
485  Fields:
486    allowJaggedRows: [Optional] Indicates if BigQuery should accept rows that
487      are missing trailing optional columns. If true, BigQuery treats missing
488      trailing columns as null values. If false, records with missing trailing
489      columns are treated as bad records, and if there are too many bad
490      records, an invalid error is returned in the job result. The default
491      value is false.
492    allowQuotedNewlines: [Optional] Indicates if BigQuery should allow quoted
493      data sections that contain newline characters in a CSV file. The default
494      value is false.
495    encoding: [Optional] The character encoding of the data. The supported
496      values are UTF-8 or ISO-8859-1. The default value is UTF-8. BigQuery
497      decodes the data after the raw, binary data has been split using the
498      values of the quote and fieldDelimiter properties.
499    fieldDelimiter: [Optional] The separator for fields in a CSV file.
500      BigQuery converts the string to ISO-8859-1 encoding, and then uses the
501      first byte of the encoded string to split the data in its raw, binary
502      state. BigQuery also supports the escape sequence "\t" to specify a tab
503      separator. The default value is a comma (',').
504    quote: [Optional] The value that is used to quote data sections in a CSV
505      file. BigQuery converts the string to ISO-8859-1 encoding, and then uses
506      the first byte of the encoded string to split the data in its raw,
507      binary state. The default value is a double-quote ('"'). If your data
508      does not contain quoted sections, set the property value to an empty
509      string. If your data contains quoted newline characters, you must also
510      set the allowQuotedNewlines property to true.
511    skipLeadingRows: [Optional] The number of rows at the top of a CSV file
512      that BigQuery will skip when reading the data. The default value is 0.
513      This property is useful if you have header rows in the file that should
514      be skipped.
515  """
516
517  allowJaggedRows = _messages.BooleanField(1)
518  allowQuotedNewlines = _messages.BooleanField(2)
519  encoding = _messages.StringField(3)
520  fieldDelimiter = _messages.StringField(4)
521  quote = _messages.StringField(5, default='"')
522  skipLeadingRows = _messages.IntegerField(6)
523
524
525class Dataset(_messages.Message):
526  r"""A Dataset object.
527
528  Messages:
529    AccessValueListEntry: A AccessValueListEntry object.
530    LabelsValue: [Experimental] The labels associated with this dataset. You
531      can use these to organize and group your datasets. You can set this
532      property when inserting or updating a dataset. Label keys and values can
533      be no longer than 63 characters, can only contain letters, numeric
534      characters, underscores and dashes. International characters are
535      allowed. Label values are optional. Label keys must start with a letter
536      and must be unique within a dataset. Both keys and values are
537      additionally constrained to be <= 128 bytes in size.
538
539  Fields:
540    access: [Optional] An array of objects that define dataset access for one
541      or more entities. You can set this property when inserting or updating a
542      dataset in order to control who is allowed to access the data. If
543      unspecified at dataset creation time, BigQuery adds default dataset
544      access for the following entities: access.specialGroup: projectReaders;
545      access.role: READER; access.specialGroup: projectWriters; access.role:
546      WRITER; access.specialGroup: projectOwners; access.role: OWNER;
547      access.userByEmail: [dataset creator email]; access.role: OWNER;
548    creationTime: [Output-only] The time when this dataset was created, in
549      milliseconds since the epoch.
550    datasetReference: [Required] A reference that identifies the dataset.
551    defaultTableExpirationMs: [Optional] The default lifetime of all tables in
552      the dataset, in milliseconds. The minimum value is 3600000 milliseconds
553      (one hour). Once this property is set, all newly-created tables in the
554      dataset will have an expirationTime property set to the creation time
555      plus the value in this property, and changing the value will only affect
556      new tables, not existing ones. When the expirationTime for a given table
557      is reached, that table will be deleted automatically. If a table's
558      expirationTime is modified or removed before the table expires, or if
559      you provide an explicit expirationTime when creating a table, that value
560      takes precedence over the default expiration time indicated by this
561      property.
562    description: [Optional] A user-friendly description of the dataset.
563    etag: [Output-only] A hash of the resource.
564    friendlyName: [Optional] A descriptive name for the dataset.
565    id: [Output-only] The fully-qualified unique name of the dataset in the
566      format projectId:datasetId. The dataset name without the project name is
567      given in the datasetId field. When creating a new dataset, leave this
568      field blank, and instead specify the datasetId field.
569    kind: [Output-only] The resource type.
570    labels: [Experimental] The labels associated with this dataset. You can
571      use these to organize and group your datasets. You can set this property
572      when inserting or updating a dataset. Label keys and values can be no
573      longer than 63 characters, can only contain letters, numeric characters,
574      underscores and dashes. International characters are allowed. Label
575      values are optional. Label keys must start with a letter and must be
576      unique within a dataset. Both keys and values are additionally
577      constrained to be <= 128 bytes in size.
578    lastModifiedTime: [Output-only] The date when this dataset or any of its
579      tables was last modified, in milliseconds since the epoch.
580    location: [Experimental] The geographic location where the dataset should
581      reside. Possible values include EU and US. The default value is US.
582    selfLink: [Output-only] A URL that can be used to access the resource
583      again. You can use this URL in Get or Update requests to the resource.
584  """
585
586  class AccessValueListEntry(_messages.Message):
587    r"""A AccessValueListEntry object.
588
589    Fields:
590      domain: [Pick one] A domain to grant access to. Any users signed in with
591        the domain specified will be granted the specified access. Example:
592        "example.com".
593      groupByEmail: [Pick one] An email address of a Google Group to grant
594        access to.
595      role: [Required] Describes the rights granted to the user specified by
596        the other member of the access object. The following string values are
597        supported: READER, WRITER, OWNER.
598      specialGroup: [Pick one] A special group to grant access to. Possible
599        values include: projectOwners: Owners of the enclosing project.
600        projectReaders: Readers of the enclosing project. projectWriters:
601        Writers of the enclosing project. allAuthenticatedUsers: All
602        authenticated BigQuery users.
603      userByEmail: [Pick one] An email address of a user to grant access to.
604        For example: fred@example.com.
605      view: [Pick one] A view from a different dataset to grant access to.
606        Queries executed against that view will have read access to tables in
607        this dataset. The role field is not required when this field is set.
608        If that view is updated by any user, access to the view needs to be
609        granted again via an update operation.
610    """
611
612    domain = _messages.StringField(1)
613    groupByEmail = _messages.StringField(2)
614    role = _messages.StringField(3)
615    specialGroup = _messages.StringField(4)
616    userByEmail = _messages.StringField(5)
617    view = _messages.MessageField('TableReference', 6)
618
619  @encoding.MapUnrecognizedFields('additionalProperties')
620  class LabelsValue(_messages.Message):
621    r"""[Experimental] The labels associated with this dataset. You can use
622    these to organize and group your datasets. You can set this property when
623    inserting or updating a dataset. Label keys and values can be no longer
624    than 63 characters, can only contain letters, numeric characters,
625    underscores and dashes. International characters are allowed. Label values
626    are optional. Label keys must start with a letter and must be unique
627    within a dataset. Both keys and values are additionally constrained to be
628    <= 128 bytes in size.
629
630    Messages:
631      AdditionalProperty: An additional property for a LabelsValue object.
632
633    Fields:
634      additionalProperties: Additional properties of type LabelsValue
635    """
636
637    class AdditionalProperty(_messages.Message):
638      r"""An additional property for a LabelsValue object.
639
640      Fields:
641        key: Name of the additional property.
642        value: A string attribute.
643      """
644
645      key = _messages.StringField(1)
646      value = _messages.StringField(2)
647
648    additionalProperties = _messages.MessageField('AdditionalProperty', 1, repeated=True)
649
650  access = _messages.MessageField('AccessValueListEntry', 1, repeated=True)
651  creationTime = _messages.IntegerField(2)
652  datasetReference = _messages.MessageField('DatasetReference', 3)
653  defaultTableExpirationMs = _messages.IntegerField(4)
654  description = _messages.StringField(5)
655  etag = _messages.StringField(6)
656  friendlyName = _messages.StringField(7)
657  id = _messages.StringField(8)
658  kind = _messages.StringField(9, default='bigquery#dataset')
659  labels = _messages.MessageField('LabelsValue', 10)
660  lastModifiedTime = _messages.IntegerField(11)
661  location = _messages.StringField(12)
662  selfLink = _messages.StringField(13)
663
664
665class DatasetList(_messages.Message):
666  r"""A DatasetList object.
667
668  Messages:
669    DatasetsValueListEntry: A DatasetsValueListEntry object.
670
671  Fields:
672    datasets: An array of the dataset resources in the project. Each resource
673      contains basic information. For full information about a particular
674      dataset resource, use the Datasets: get method. This property is omitted
675      when there are no datasets in the project.
676    etag: A hash value of the results page. You can use this property to
677      determine if the page has changed since the last request.
678    kind: The list type. This property always returns the value
679      "bigquery#datasetList".
680    nextPageToken: A token that can be used to request the next results page.
681      This property is omitted on the final results page.
682  """
683
684  class DatasetsValueListEntry(_messages.Message):
685    r"""A DatasetsValueListEntry object.
686
687    Messages:
688      LabelsValue: [Experimental] The labels associated with this dataset. You
689        can use these to organize and group your datasets.
690
691    Fields:
692      datasetReference: The dataset reference. Use this property to access
693        specific parts of the dataset's ID, such as project ID or dataset ID.
694      friendlyName: A descriptive name for the dataset, if one exists.
695      id: The fully-qualified, unique, opaque ID of the dataset.
696      kind: The resource type. This property always returns the value
697        "bigquery#dataset".
698      labels: [Experimental] The labels associated with this dataset. You can
699        use these to organize and group your datasets.
700    """
701
702    @encoding.MapUnrecognizedFields('additionalProperties')
703    class LabelsValue(_messages.Message):
704      r"""[Experimental] The labels associated with this dataset. You can use
705      these to organize and group your datasets.
706
707      Messages:
708        AdditionalProperty: An additional property for a LabelsValue object.
709
710      Fields:
711        additionalProperties: Additional properties of type LabelsValue
712      """
713
714      class AdditionalProperty(_messages.Message):
715        r"""An additional property for a LabelsValue object.
716
717        Fields:
718          key: Name of the additional property.
719          value: A string attribute.
720        """
721
722        key = _messages.StringField(1)
723        value = _messages.StringField(2)
724
725      additionalProperties = _messages.MessageField('AdditionalProperty', 1, repeated=True)
726
727    datasetReference = _messages.MessageField('DatasetReference', 1)
728    friendlyName = _messages.StringField(2)
729    id = _messages.StringField(3)
730    kind = _messages.StringField(4, default='bigquery#dataset')
731    labels = _messages.MessageField('LabelsValue', 5)
732
733  datasets = _messages.MessageField('DatasetsValueListEntry', 1, repeated=True)
734  etag = _messages.StringField(2)
735  kind = _messages.StringField(3, default='bigquery#datasetList')
736  nextPageToken = _messages.StringField(4)
737
738
739class DatasetReference(_messages.Message):
740  r"""A DatasetReference object.
741
742  Fields:
743    datasetId: [Required] A unique ID for this dataset, without the project
744      name. The ID must contain only letters (a-z, A-Z), numbers (0-9), or
745      underscores (_). The maximum length is 1,024 characters.
746    projectId: [Optional] The ID of the project containing this dataset.
747  """
748
749  datasetId = _messages.StringField(1)
750  projectId = _messages.StringField(2)
751
752
753class ErrorProto(_messages.Message):
754  r"""A ErrorProto object.
755
756  Fields:
757    debugInfo: Debugging information. This property is internal to Google and
758      should not be used.
759    location: Specifies where the error occurred, if present.
760    message: A human-readable description of the error.
761    reason: A short error code that summarizes the error.
762  """
763
764  debugInfo = _messages.StringField(1)
765  location = _messages.StringField(2)
766  message = _messages.StringField(3)
767  reason = _messages.StringField(4)
768
769
770class ExplainQueryStage(_messages.Message):
771  r"""A ExplainQueryStage object.
772
773  Fields:
774    computeRatioAvg: Relative amount of time the average shard spent on CPU-
775      bound tasks.
776    computeRatioMax: Relative amount of time the slowest shard spent on CPU-
777      bound tasks.
778    id: Unique ID for stage within plan.
779    name: Human-readable name for stage.
780    readRatioAvg: Relative amount of time the average shard spent reading
781      input.
782    readRatioMax: Relative amount of time the slowest shard spent reading
783      input.
784    recordsRead: Number of records read into the stage.
785    recordsWritten: Number of records written by the stage.
786    steps: List of operations within the stage in dependency order
787      (approximately chronological).
788    waitRatioAvg: Relative amount of time the average shard spent waiting to
789      be scheduled.
790    waitRatioMax: Relative amount of time the slowest shard spent waiting to
791      be scheduled.
792    writeRatioAvg: Relative amount of time the average shard spent on writing
793      output.
794    writeRatioMax: Relative amount of time the slowest shard spent on writing
795      output.
796  """
797
798  computeRatioAvg = _messages.FloatField(1)
799  computeRatioMax = _messages.FloatField(2)
800  id = _messages.IntegerField(3)
801  name = _messages.StringField(4)
802  readRatioAvg = _messages.FloatField(5)
803  readRatioMax = _messages.FloatField(6)
804  recordsRead = _messages.IntegerField(7)
805  recordsWritten = _messages.IntegerField(8)
806  steps = _messages.MessageField('ExplainQueryStep', 9, repeated=True)
807  waitRatioAvg = _messages.FloatField(10)
808  waitRatioMax = _messages.FloatField(11)
809  writeRatioAvg = _messages.FloatField(12)
810  writeRatioMax = _messages.FloatField(13)
811
812
813class ExplainQueryStep(_messages.Message):
814  r"""A ExplainQueryStep object.
815
816  Fields:
817    kind: Machine-readable operation type.
818    substeps: Human-readable stage descriptions.
819  """
820
821  kind = _messages.StringField(1)
822  substeps = _messages.StringField(2, repeated=True)
823
824
825class ExternalDataConfiguration(_messages.Message):
826  r"""A ExternalDataConfiguration object.
827
828  Fields:
829    autodetect: [Experimental] Try to detect schema and format options
830      automatically. Any option specified explicitly will be honored.
831    bigtableOptions: [Optional] Additional options if sourceFormat is set to
832      BIGTABLE.
833    compression: [Optional] The compression type of the data source. Possible
834      values include GZIP and NONE. The default value is NONE. This setting is
835      ignored for Google Cloud Bigtable, Google Cloud Datastore backups and
836      Avro formats.
837    csvOptions: Additional properties to set if sourceFormat is set to CSV.
838    googleSheetsOptions: [Optional] Additional options if sourceFormat is set
839      to GOOGLE_SHEETS.
840    ignoreUnknownValues: [Optional] Indicates if BigQuery should allow extra
841      values that are not represented in the table schema. If true, the extra
842      values are ignored. If false, records with extra columns are treated as
843      bad records, and if there are too many bad records, an invalid error is
844      returned in the job result. The default value is false. The sourceFormat
845      property determines what BigQuery treats as an extra value: CSV:
846      Trailing columns JSON: Named values that don't match any column names
847      Google Cloud Bigtable: This setting is ignored. Google Cloud Datastore
848      backups: This setting is ignored. Avro: This setting is ignored.
849    maxBadRecords: [Optional] The maximum number of bad records that BigQuery
850      can ignore when reading data. If the number of bad records exceeds this
851      value, an invalid error is returned in the job result. The default value
852      is 0, which requires that all records are valid. This setting is ignored
853      for Google Cloud Bigtable, Google Cloud Datastore backups and Avro
854      formats.
855    schema: [Optional] The schema for the data. Schema is required for CSV and
856      JSON formats. Schema is disallowed for Google Cloud Bigtable, Cloud
857      Datastore backups, and Avro formats.
858    sourceFormat: [Required] The data format. For CSV files, specify "CSV".
859      For Google sheets, specify "GOOGLE_SHEETS". For newline-delimited JSON,
860      specify "NEWLINE_DELIMITED_JSON". For Avro files, specify "AVRO". For
861      Google Cloud Datastore backups, specify "DATASTORE_BACKUP".
862      [Experimental] For Google Cloud Bigtable, specify "BIGTABLE". Please
863      note that reading from Google Cloud Bigtable is experimental and has to
864      be enabled for your project. Please contact Google Cloud Support to
865      enable this for your project.
866    sourceUris: [Required] The fully-qualified URIs that point to your data in
867      Google Cloud. For Google Cloud Storage URIs: Each URI can contain one
868      '*' wildcard character and it must come after the 'bucket' name. Size
869      limits related to load jobs apply to external data sources. For Google
870      Cloud Bigtable URIs: Exactly one URI can be specified and it has be a
871      fully specified and valid HTTPS URL for a Google Cloud Bigtable table.
872      For Google Cloud Datastore backups, exactly one URI can be specified,
873      and it must end with '.backup_info'. Also, the '*' wildcard character is
874      not allowed.
875  """
876
877  autodetect = _messages.BooleanField(1)
878  bigtableOptions = _messages.MessageField('BigtableOptions', 2)
879  compression = _messages.StringField(3)
880  csvOptions = _messages.MessageField('CsvOptions', 4)
881  googleSheetsOptions = _messages.MessageField('GoogleSheetsOptions', 5)
882  ignoreUnknownValues = _messages.BooleanField(6)
883  maxBadRecords = _messages.IntegerField(7, variant=_messages.Variant.INT32)
884  schema = _messages.MessageField('TableSchema', 8)
885  sourceFormat = _messages.StringField(9)
886  sourceUris = _messages.StringField(10, repeated=True)
887
888
889class GetQueryResultsResponse(_messages.Message):
890  r"""A GetQueryResultsResponse object.
891
892  Fields:
893    cacheHit: Whether the query result was fetched from the query cache.
894    errors: [Output-only] All errors and warnings encountered during the
895      running of the job. Errors here do not necessarily mean that the job has
896      completed or was unsuccessful.
897    etag: A hash of this response.
898    jobComplete: Whether the query has completed or not. If rows or totalRows
899      are present, this will always be true. If this is false, totalRows will
900      not be available.
901    jobReference: Reference to the BigQuery Job that was created to run the
902      query. This field will be present even if the original request timed
903      out, in which case GetQueryResults can be used to read the results once
904      the query has completed. Since this API only returns the first page of
905      results, subsequent pages can be fetched via the same mechanism
906      (GetQueryResults).
907    kind: The resource type of the response.
908    numDmlAffectedRows: [Output-only, Experimental] The number of rows
909      affected by a DML statement. Present only for DML statements INSERT,
910      UPDATE or DELETE.
911    pageToken: A token used for paging results.
912    rows: An object with as many results as can be contained within the
913      maximum permitted reply size. To get any additional rows, you can call
914      GetQueryResults and specify the jobReference returned above. Present
915      only when the query completes successfully.
916    schema: The schema of the results. Present only when the query completes
917      successfully.
918    totalBytesProcessed: The total number of bytes processed for this query.
919    totalRows: The total number of rows in the complete query result set,
920      which can be more than the number of rows in this single page of
921      results. Present only when the query completes successfully.
922  """
923
924  cacheHit = _messages.BooleanField(1)
925  errors = _messages.MessageField('ErrorProto', 2, repeated=True)
926  etag = _messages.StringField(3)
927  jobComplete = _messages.BooleanField(4)
928  jobReference = _messages.MessageField('JobReference', 5)
929  kind = _messages.StringField(6, default='bigquery#getQueryResultsResponse')
930  numDmlAffectedRows = _messages.IntegerField(7)
931  pageToken = _messages.StringField(8)
932  rows = _messages.MessageField('TableRow', 9, repeated=True)
933  schema = _messages.MessageField('TableSchema', 10)
934  totalBytesProcessed = _messages.IntegerField(11)
935  totalRows = _messages.IntegerField(12, variant=_messages.Variant.UINT64)
936
937
938class GoogleSheetsOptions(_messages.Message):
939  r"""A GoogleSheetsOptions object.
940
941  Fields:
942    skipLeadingRows: [Optional] The number of rows at the top of a sheet that
943      BigQuery will skip when reading the data. The default value is 0. This
944      property is useful if you have header rows that should be skipped. When
945      autodetect is on, behavior is the following: * skipLeadingRows
946      unspecified - Autodetect tries to detect headers in the first row. If
947      they are not detected, the row is read as data. Otherwise data is read
948      starting from the second row. * skipLeadingRows is 0 - Instructs
949      autodetect that there are no headers and data should be read starting
950      from the first row. * skipLeadingRows = N > 0 - Autodetect skips N-1
951      rows and tries to detect headers in row N. If headers are not detected,
952      row N is just skipped. Otherwise row N is used to extract column names
953      for the detected schema.
954  """
955
956  skipLeadingRows = _messages.IntegerField(1)
957
958
959class Job(_messages.Message):
960  r"""A Job object.
961
962  Fields:
963    configuration: [Required] Describes the job configuration.
964    etag: [Output-only] A hash of this resource.
965    id: [Output-only] Opaque ID field of the job
966    jobReference: [Optional] Reference describing the unique-per-user name of
967      the job.
968    kind: [Output-only] The type of the resource.
969    selfLink: [Output-only] A URL that can be used to access this resource
970      again.
971    statistics: [Output-only] Information about the job, including starting
972      time and ending time of the job.
973    status: [Output-only] The status of this job. Examine this value when
974      polling an asynchronous job to see if the job is complete.
975    user_email: [Output-only] Email address of the user who ran the job.
976  """
977
978  configuration = _messages.MessageField('JobConfiguration', 1)
979  etag = _messages.StringField(2)
980  id = _messages.StringField(3)
981  jobReference = _messages.MessageField('JobReference', 4)
982  kind = _messages.StringField(5, default='bigquery#job')
983  selfLink = _messages.StringField(6)
984  statistics = _messages.MessageField('JobStatistics', 7)
985  status = _messages.MessageField('JobStatus', 8)
986  user_email = _messages.StringField(9)
987
988
989class JobCancelResponse(_messages.Message):
990  r"""A JobCancelResponse object.
991
992  Fields:
993    job: The final state of the job.
994    kind: The resource type of the response.
995  """
996
997  job = _messages.MessageField('Job', 1)
998  kind = _messages.StringField(2, default='bigquery#jobCancelResponse')
999
1000
1001class JobConfiguration(_messages.Message):
1002  r"""A JobConfiguration object.
1003
1004  Fields:
1005    copy: [Pick one] Copies a table.
1006    dryRun: [Optional] If set, don't actually run this job. A valid query will
1007      return a mostly empty response with some processing statistics, while an
1008      invalid query will return the same error it would if it wasn't a dry
1009      run. Behavior of non-query jobs is undefined.
1010    extract: [Pick one] Configures an extract job.
1011    load: [Pick one] Configures a load job.
1012    query: [Pick one] Configures a query job.
1013  """
1014
1015  copy = _messages.MessageField('JobConfigurationTableCopy', 1)
1016  dryRun = _messages.BooleanField(2)
1017  extract = _messages.MessageField('JobConfigurationExtract', 3)
1018  load = _messages.MessageField('JobConfigurationLoad', 4)
1019  query = _messages.MessageField('JobConfigurationQuery', 5)
1020
1021
1022class JobConfigurationExtract(_messages.Message):
1023  r"""A JobConfigurationExtract object.
1024
1025  Fields:
1026    compression: [Optional] The compression type to use for exported files.
1027      Possible values include GZIP and NONE. The default value is NONE.
1028    destinationFormat: [Optional] The exported file format. Possible values
1029      include CSV, NEWLINE_DELIMITED_JSON and AVRO. The default value is CSV.
1030      Tables with nested or repeated fields cannot be exported as CSV.
1031    destinationUri: [Pick one] DEPRECATED: Use destinationUris instead,
1032      passing only one URI as necessary. The fully-qualified Google Cloud
1033      Storage URI where the extracted table should be written.
1034    destinationUris: [Pick one] A list of fully-qualified Google Cloud Storage
1035      URIs where the extracted table should be written.
1036    fieldDelimiter: [Optional] Delimiter to use between fields in the exported
1037      data. Default is ','
1038    printHeader: [Optional] Whether to print out a header row in the results.
1039      Default is true.
1040    sourceTable: [Required] A reference to the table being exported.
1041  """
1042
1043  compression = _messages.StringField(1)
1044  destinationFormat = _messages.StringField(2)
1045  destinationUri = _messages.StringField(3)
1046  destinationUris = _messages.StringField(4, repeated=True)
1047  fieldDelimiter = _messages.StringField(5)
1048  printHeader = _messages.BooleanField(6, default=True)
1049  sourceTable = _messages.MessageField('TableReference', 7)
1050
1051
1052class JobConfigurationLoad(_messages.Message):
1053  r"""A JobConfigurationLoad object.
1054
1055  Fields:
1056    allowJaggedRows: [Optional] Accept rows that are missing trailing optional
1057      columns. The missing values are treated as nulls. If false, records with
1058      missing trailing columns are treated as bad records, and if there are
1059      too many bad records, an invalid error is returned in the job result.
1060      The default value is false. Only applicable to CSV, ignored for other
1061      formats.
1062    allowQuotedNewlines: Indicates if BigQuery should allow quoted data
1063      sections that contain newline characters in a CSV file. The default
1064      value is false.
1065    autodetect: [Experimental] Indicates if we should automatically infer the
1066      options and schema for CSV and JSON sources.
1067    createDisposition: [Optional] Specifies whether the job is allowed to
1068      create new tables. The following values are supported: CREATE_IF_NEEDED:
1069      If the table does not exist, BigQuery creates the table. CREATE_NEVER:
1070      The table must already exist. If it does not, a 'notFound' error is
1071      returned in the job result. The default value is CREATE_IF_NEEDED.
1072      Creation, truncation and append actions occur as one atomic update upon
1073      job completion.
1074    destinationTable: [Required] The destination table to load the data into.
1075    encoding: [Optional] The character encoding of the data. The supported
1076      values are UTF-8 or ISO-8859-1. The default value is UTF-8. BigQuery
1077      decodes the data after the raw, binary data has been split using the
1078      values of the quote and fieldDelimiter properties.
1079    fieldDelimiter: [Optional] The separator for fields in a CSV file. The
1080      separator can be any ISO-8859-1 single-byte character. To use a
1081      character in the range 128-255, you must encode the character as UTF8.
1082      BigQuery converts the string to ISO-8859-1 encoding, and then uses the
1083      first byte of the encoded string to split the data in its raw, binary
1084      state. BigQuery also supports the escape sequence "\t" to specify a tab
1085      separator. The default value is a comma (',').
1086    ignoreUnknownValues: [Optional] Indicates if BigQuery should allow extra
1087      values that are not represented in the table schema. If true, the extra
1088      values are ignored. If false, records with extra columns are treated as
1089      bad records, and if there are too many bad records, an invalid error is
1090      returned in the job result. The default value is false. The sourceFormat
1091      property determines what BigQuery treats as an extra value: CSV:
1092      Trailing columns JSON: Named values that don't match any column names
1093    maxBadRecords: [Optional] The maximum number of bad records that BigQuery
1094      can ignore when running the job. If the number of bad records exceeds
1095      this value, an invalid error is returned in the job result. The default
1096      value is 0, which requires that all records are valid.
1097    projectionFields: [Experimental] If sourceFormat is set to
1098      "DATASTORE_BACKUP", indicates which entity properties to load into
1099      BigQuery from a Cloud Datastore backup. Property names are case
1100      sensitive and must be top-level properties. If no properties are
1101      specified, BigQuery loads all properties. If any named property isn't
1102      found in the Cloud Datastore backup, an invalid error is returned in the
1103      job result.
1104    quote: [Optional] The value that is used to quote data sections in a CSV
1105      file. BigQuery converts the string to ISO-8859-1 encoding, and then uses
1106      the first byte of the encoded string to split the data in its raw,
1107      binary state. The default value is a double-quote ('"'). If your data
1108      does not contain quoted sections, set the property value to an empty
1109      string. If your data contains quoted newline characters, you must also
1110      set the allowQuotedNewlines property to true.
1111    schema: [Optional] The schema for the destination table. The schema can be
1112      omitted if the destination table already exists, or if you're loading
1113      data from Google Cloud Datastore.
1114    schemaInline: [Deprecated] The inline schema. For CSV schemas, specify as
1115      "Field1:Type1[,Field2:Type2]*". For example, "foo:STRING, bar:INTEGER,
1116      baz:FLOAT".
1117    schemaInlineFormat: [Deprecated] The format of the schemaInline property.
1118    schemaUpdateOptions: [Experimental] Allows the schema of the desitination
1119      table to be updated as a side effect of the load job. Schema update
1120      options are supported in two cases: when writeDisposition is
1121      WRITE_APPEND; when writeDisposition is WRITE_TRUNCATE and the
1122      destination table is a partition of a table, specified by partition
1123      decorators. For normal tables, WRITE_TRUNCATE will always overwrite the
1124      schema. One or more of the following values are specified:
1125      ALLOW_FIELD_ADDITION: allow adding a nullable field to the schema.
1126      ALLOW_FIELD_RELAXATION: allow relaxing a required field in the original
1127      schema to nullable.
1128    skipLeadingRows: [Optional] The number of rows at the top of a CSV file
1129      that BigQuery will skip when loading the data. The default value is 0.
1130      This property is useful if you have header rows in the file that should
1131      be skipped.
1132    sourceFormat: [Optional] The format of the data files. For CSV files,
1133      specify "CSV". For datastore backups, specify "DATASTORE_BACKUP". For
1134      newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON". For Avro,
1135      specify "AVRO". The default value is CSV.
1136    sourceUris: [Required] The fully-qualified URIs that point to your data in
1137      Google Cloud Storage. Each URI can contain one '*' wildcard character
1138      and it must come after the 'bucket' name.
1139    writeDisposition: [Optional] Specifies the action that occurs if the
1140      destination table already exists. The following values are supported:
1141      WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the
1142      table data. WRITE_APPEND: If the table already exists, BigQuery appends
1143      the data to the table. WRITE_EMPTY: If the table already exists and
1144      contains data, a 'duplicate' error is returned in the job result. The
1145      default value is WRITE_APPEND. Each action is atomic and only occurs if
1146      BigQuery is able to complete the job successfully. Creation, truncation
1147      and append actions occur as one atomic update upon job completion.
1148  """
1149
1150  allowJaggedRows = _messages.BooleanField(1)
1151  allowQuotedNewlines = _messages.BooleanField(2)
1152  autodetect = _messages.BooleanField(3)
1153  createDisposition = _messages.StringField(4)
1154  destinationTable = _messages.MessageField('TableReference', 5)
1155  encoding = _messages.StringField(6)
1156  fieldDelimiter = _messages.StringField(7)
1157  ignoreUnknownValues = _messages.BooleanField(8)
1158  maxBadRecords = _messages.IntegerField(9, variant=_messages.Variant.INT32)
1159  projectionFields = _messages.StringField(10, repeated=True)
1160  quote = _messages.StringField(11, default='"')
1161  schema = _messages.MessageField('TableSchema', 12)
1162  schemaInline = _messages.StringField(13)
1163  schemaInlineFormat = _messages.StringField(14)
1164  schemaUpdateOptions = _messages.StringField(15, repeated=True)
1165  skipLeadingRows = _messages.IntegerField(16, variant=_messages.Variant.INT32)
1166  sourceFormat = _messages.StringField(17)
1167  sourceUris = _messages.StringField(18, repeated=True)
1168  writeDisposition = _messages.StringField(19)
1169
1170
1171class JobConfigurationQuery(_messages.Message):
1172  r"""A JobConfigurationQuery object.
1173
1174  Messages:
1175    TableDefinitionsValue: [Optional] If querying an external data source
1176      outside of BigQuery, describes the data format, location and other
1177      properties of the data source. By defining these properties, the data
1178      source can then be queried as if it were a standard BigQuery table.
1179
1180  Fields:
1181    allowLargeResults: If true, allows the query to produce arbitrarily large
1182      result tables at a slight cost in performance. Requires destinationTable
1183      to be set.
1184    createDisposition: [Optional] Specifies whether the job is allowed to
1185      create new tables. The following values are supported: CREATE_IF_NEEDED:
1186      If the table does not exist, BigQuery creates the table. CREATE_NEVER:
1187      The table must already exist. If it does not, a 'notFound' error is
1188      returned in the job result. The default value is CREATE_IF_NEEDED.
1189      Creation, truncation and append actions occur as one atomic update upon
1190      job completion.
1191    defaultDataset: [Optional] Specifies the default dataset to use for
1192      unqualified table names in the query.
1193    destinationTable: [Optional] Describes the table where the query results
1194      should be stored. If not present, a new table will be created to store
1195      the results.
1196    flattenResults: [Optional] Flattens all nested and repeated fields in the
1197      query results. The default value is true. allowLargeResults must be true
1198      if this is set to false.
1199    maximumBillingTier: [Optional] Limits the billing tier for this job.
1200      Queries that have resource usage beyond this tier will fail (without
1201      incurring a charge). If unspecified, this will be set to your project
1202      default.
1203    maximumBytesBilled: [Optional] Limits the bytes billed for this job.
1204      Queries that will have bytes billed beyond this limit will fail (without
1205      incurring a charge). If unspecified, this will be set to your project
1206      default.
1207    preserveNulls: [Deprecated] This property is deprecated.
1208    priority: [Optional] Specifies a priority for the query. Possible values
1209      include INTERACTIVE and BATCH. The default value is INTERACTIVE.
1210    query: [Required] BigQuery SQL query to execute.
1211    schemaUpdateOptions: [Experimental] Allows the schema of the desitination
1212      table to be updated as a side effect of the query job. Schema update
1213      options are supported in two cases: when writeDisposition is
1214      WRITE_APPEND; when writeDisposition is WRITE_TRUNCATE and the
1215      destination table is a partition of a table, specified by partition
1216      decorators. For normal tables, WRITE_TRUNCATE will always overwrite the
1217      schema. One or more of the following values are specified:
1218      ALLOW_FIELD_ADDITION: allow adding a nullable field to the schema.
1219      ALLOW_FIELD_RELAXATION: allow relaxing a required field in the original
1220      schema to nullable.
1221    tableDefinitions: [Optional] If querying an external data source outside
1222      of BigQuery, describes the data format, location and other properties of
1223      the data source. By defining these properties, the data source can then
1224      be queried as if it were a standard BigQuery table.
1225    useLegacySql: [Experimental] Specifies whether to use BigQuery's legacy
1226      SQL dialect for this query. The default value is true. If set to false,
1227      the query will use BigQuery's standard SQL:
1228      https://cloud.google.com/bigquery/sql-reference/ When useLegacySql is
1229      set to false, the values of allowLargeResults and flattenResults are
1230      ignored; query will be run as if allowLargeResults is true and
1231      flattenResults is false.
1232    useQueryCache: [Optional] Whether to look for the result in the query
1233      cache. The query cache is a best-effort cache that will be flushed
1234      whenever tables in the query are modified. Moreover, the query cache is
1235      only available when a query does not have a destination table specified.
1236      The default value is true.
1237    userDefinedFunctionResources: [Experimental] Describes user-defined
1238      function resources used in the query.
1239    writeDisposition: [Optional] Specifies the action that occurs if the
1240      destination table already exists. The following values are supported:
1241      WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the
1242      table data. WRITE_APPEND: If the table already exists, BigQuery appends
1243      the data to the table. WRITE_EMPTY: If the table already exists and
1244      contains data, a 'duplicate' error is returned in the job result. The
1245      default value is WRITE_EMPTY. Each action is atomic and only occurs if
1246      BigQuery is able to complete the job successfully. Creation, truncation
1247      and append actions occur as one atomic update upon job completion.
1248  """
1249
1250  @encoding.MapUnrecognizedFields('additionalProperties')
1251  class TableDefinitionsValue(_messages.Message):
1252    r"""[Optional] If querying an external data source outside of BigQuery,
1253    describes the data format, location and other properties of the data
1254    source. By defining these properties, the data source can then be queried
1255    as if it were a standard BigQuery table.
1256
1257    Messages:
1258      AdditionalProperty: An additional property for a TableDefinitionsValue
1259        object.
1260
1261    Fields:
1262      additionalProperties: Additional properties of type
1263        TableDefinitionsValue
1264    """
1265
1266    class AdditionalProperty(_messages.Message):
1267      r"""An additional property for a TableDefinitionsValue object.
1268
1269      Fields:
1270        key: Name of the additional property.
1271        value: A ExternalDataConfiguration attribute.
1272      """
1273
1274      key = _messages.StringField(1)
1275      value = _messages.MessageField('ExternalDataConfiguration', 2)
1276
1277    additionalProperties = _messages.MessageField('AdditionalProperty', 1, repeated=True)
1278
1279  allowLargeResults = _messages.BooleanField(1)
1280  createDisposition = _messages.StringField(2)
1281  defaultDataset = _messages.MessageField('DatasetReference', 3)
1282  destinationTable = _messages.MessageField('TableReference', 4)
1283  flattenResults = _messages.BooleanField(5, default=True)
1284  maximumBillingTier = _messages.IntegerField(6, variant=_messages.Variant.INT32, default=1)
1285  maximumBytesBilled = _messages.IntegerField(7)
1286  preserveNulls = _messages.BooleanField(8)
1287  priority = _messages.StringField(9)
1288  query = _messages.StringField(10)
1289  schemaUpdateOptions = _messages.StringField(11, repeated=True)
1290  tableDefinitions = _messages.MessageField('TableDefinitionsValue', 12)
1291  useLegacySql = _messages.BooleanField(13)
1292  useQueryCache = _messages.BooleanField(14, default=True)
1293  userDefinedFunctionResources = _messages.MessageField('UserDefinedFunctionResource', 15, repeated=True)
1294  writeDisposition = _messages.StringField(16)
1295
1296
1297class JobConfigurationTableCopy(_messages.Message):
1298  r"""A JobConfigurationTableCopy object.
1299
1300  Fields:
1301    createDisposition: [Optional] Specifies whether the job is allowed to
1302      create new tables. The following values are supported: CREATE_IF_NEEDED:
1303      If the table does not exist, BigQuery creates the table. CREATE_NEVER:
1304      The table must already exist. If it does not, a 'notFound' error is
1305      returned in the job result. The default value is CREATE_IF_NEEDED.
1306      Creation, truncation and append actions occur as one atomic update upon
1307      job completion.
1308    destinationTable: [Required] The destination table
1309    sourceTable: [Pick one] Source table to copy.
1310    sourceTables: [Pick one] Source tables to copy.
1311    writeDisposition: [Optional] Specifies the action that occurs if the
1312      destination table already exists. The following values are supported:
1313      WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the
1314      table data. WRITE_APPEND: If the table already exists, BigQuery appends
1315      the data to the table. WRITE_EMPTY: If the table already exists and
1316      contains data, a 'duplicate' error is returned in the job result. The
1317      default value is WRITE_EMPTY. Each action is atomic and only occurs if
1318      BigQuery is able to complete the job successfully. Creation, truncation
1319      and append actions occur as one atomic update upon job completion.
1320  """
1321
1322  createDisposition = _messages.StringField(1)
1323  destinationTable = _messages.MessageField('TableReference', 2)
1324  sourceTable = _messages.MessageField('TableReference', 3)
1325  sourceTables = _messages.MessageField('TableReference', 4, repeated=True)
1326  writeDisposition = _messages.StringField(5)
1327
1328
1329class JobList(_messages.Message):
1330  r"""A JobList object.
1331
1332  Messages:
1333    JobsValueListEntry: A JobsValueListEntry object.
1334
1335  Fields:
1336    etag: A hash of this page of results.
1337    jobs: List of jobs that were requested.
1338    kind: The resource type of the response.
1339    nextPageToken: A token to request the next page of results.
1340  """
1341
1342  class JobsValueListEntry(_messages.Message):
1343    r"""A JobsValueListEntry object.
1344
1345    Fields:
1346      configuration: [Full-projection-only] Specifies the job configuration.
1347      errorResult: A result object that will be present only if the job has
1348        failed.
1349      id: Unique opaque ID of the job.
1350      jobReference: Job reference uniquely identifying the job.
1351      kind: The resource type.
1352      state: Running state of the job. When the state is DONE, errorResult can
1353        be checked to determine whether the job succeeded or failed.
1354      statistics: [Output-only] Information about the job, including starting
1355        time and ending time of the job.
1356      status: [Full-projection-only] Describes the state of the job.
1357      user_email: [Full-projection-only] Email address of the user who ran the
1358        job.
1359    """
1360
1361    configuration = _messages.MessageField('JobConfiguration', 1)
1362    errorResult = _messages.MessageField('ErrorProto', 2)
1363    id = _messages.StringField(3)
1364    jobReference = _messages.MessageField('JobReference', 4)
1365    kind = _messages.StringField(5, default='bigquery#job')
1366    state = _messages.StringField(6)
1367    statistics = _messages.MessageField('JobStatistics', 7)
1368    status = _messages.MessageField('JobStatus', 8)
1369    user_email = _messages.StringField(9)
1370
1371  etag = _messages.StringField(1)
1372  jobs = _messages.MessageField('JobsValueListEntry', 2, repeated=True)
1373  kind = _messages.StringField(3, default='bigquery#jobList')
1374  nextPageToken = _messages.StringField(4)
1375
1376
1377class JobReference(_messages.Message):
1378  r"""A JobReference object.
1379
1380  Fields:
1381    jobId: [Required] The ID of the job. The ID must contain only letters
1382      (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-). The maximum
1383      length is 1,024 characters.
1384    projectId: [Required] The ID of the project containing this job.
1385  """
1386
1387  jobId = _messages.StringField(1)
1388  projectId = _messages.StringField(2)
1389
1390
1391class JobStatistics(_messages.Message):
1392  r"""A JobStatistics object.
1393
1394  Fields:
1395    creationTime: [Output-only] Creation time of this job, in milliseconds
1396      since the epoch. This field will be present on all jobs.
1397    endTime: [Output-only] End time of this job, in milliseconds since the
1398      epoch. This field will be present whenever a job is in the DONE state.
1399    extract: [Output-only] Statistics for an extract job.
1400    load: [Output-only] Statistics for a load job.
1401    query: [Output-only] Statistics for a query job.
1402    startTime: [Output-only] Start time of this job, in milliseconds since the
1403      epoch. This field will be present when the job transitions from the
1404      PENDING state to either RUNNING or DONE.
1405    totalBytesProcessed: [Output-only] [Deprecated] Use the bytes processed in
1406      the query statistics instead.
1407  """
1408
1409  creationTime = _messages.IntegerField(1)
1410  endTime = _messages.IntegerField(2)
1411  extract = _messages.MessageField('JobStatistics4', 3)
1412  load = _messages.MessageField('JobStatistics3', 4)
1413  query = _messages.MessageField('JobStatistics2', 5)
1414  startTime = _messages.IntegerField(6)
1415  totalBytesProcessed = _messages.IntegerField(7)
1416
1417
1418class JobStatistics2(_messages.Message):
1419  r"""A JobStatistics2 object.
1420
1421  Fields:
1422    billingTier: [Output-only] Billing tier for the job.
1423    cacheHit: [Output-only] Whether the query result was fetched from the
1424      query cache.
1425    numDmlAffectedRows: [Output-only, Experimental] The number of rows
1426      affected by a DML statement. Present only for DML statements INSERT,
1427      UPDATE or DELETE.
1428    queryPlan: [Output-only, Experimental] Describes execution plan for the
1429      query.
1430    referencedTables: [Output-only, Experimental] Referenced tables for the
1431      job. Queries that reference more than 50 tables will not have a complete
1432      list.
1433    schema: [Output-only, Experimental] The schema of the results. Present
1434      only for successful dry run of non-legacy SQL queries.
1435    totalBytesBilled: [Output-only] Total bytes billed for the job.
1436    totalBytesProcessed: [Output-only] Total bytes processed for the job.
1437  """
1438
1439  billingTier = _messages.IntegerField(1, variant=_messages.Variant.INT32)
1440  cacheHit = _messages.BooleanField(2)
1441  numDmlAffectedRows = _messages.IntegerField(3)
1442  queryPlan = _messages.MessageField('ExplainQueryStage', 4, repeated=True)
1443  referencedTables = _messages.MessageField('TableReference', 5, repeated=True)
1444  schema = _messages.MessageField('TableSchema', 6)
1445  totalBytesBilled = _messages.IntegerField(7)
1446  totalBytesProcessed = _messages.IntegerField(8)
1447
1448
1449class JobStatistics3(_messages.Message):
1450  r"""A JobStatistics3 object.
1451
1452  Fields:
1453    inputFileBytes: [Output-only] Number of bytes of source data in a load
1454      job.
1455    inputFiles: [Output-only] Number of source files in a load job.
1456    outputBytes: [Output-only] Size of the loaded data in bytes. Note that
1457      while a load job is in the running state, this value may change.
1458    outputRows: [Output-only] Number of rows imported in a load job. Note that
1459      while an import job is in the running state, this value may change.
1460  """
1461
1462  inputFileBytes = _messages.IntegerField(1)
1463  inputFiles = _messages.IntegerField(2)
1464  outputBytes = _messages.IntegerField(3)
1465  outputRows = _messages.IntegerField(4)
1466
1467
1468class JobStatistics4(_messages.Message):
1469  r"""A JobStatistics4 object.
1470
1471  Fields:
1472    destinationUriFileCounts: [Output-only] Number of files per destination
1473      URI or URI pattern specified in the extract configuration. These values
1474      will be in the same order as the URIs specified in the 'destinationUris'
1475      field.
1476  """
1477
1478  destinationUriFileCounts = _messages.IntegerField(1, repeated=True)
1479
1480
1481class JobStatus(_messages.Message):
1482  r"""A JobStatus object.
1483
1484  Fields:
1485    errorResult: [Output-only] Final error result of the job. If present,
1486      indicates that the job has completed and was unsuccessful.
1487    errors: [Output-only] All errors encountered during the running of the
1488      job. Errors here do not necessarily mean that the job has completed or
1489      was unsuccessful.
1490    state: [Output-only] Running state of the job.
1491  """
1492
1493  errorResult = _messages.MessageField('ErrorProto', 1)
1494  errors = _messages.MessageField('ErrorProto', 2, repeated=True)
1495  state = _messages.StringField(3)
1496
1497
1498@encoding.MapUnrecognizedFields('additionalProperties')
1499class JsonObject(_messages.Message):
1500  r"""Represents a single JSON object.
1501
1502  Messages:
1503    AdditionalProperty: An additional property for a JsonObject object.
1504
1505  Fields:
1506    additionalProperties: Additional properties of type JsonObject
1507  """
1508
1509  class AdditionalProperty(_messages.Message):
1510    r"""An additional property for a JsonObject object.
1511
1512    Fields:
1513      key: Name of the additional property.
1514      value: A JsonValue attribute.
1515    """
1516
1517    key = _messages.StringField(1)
1518    value = _messages.MessageField('JsonValue', 2)
1519
1520  additionalProperties = _messages.MessageField('AdditionalProperty', 1, repeated=True)
1521
1522
1523JsonValue = extra_types.JsonValue
1524
1525
1526class ProjectList(_messages.Message):
1527  r"""A ProjectList object.
1528
1529  Messages:
1530    ProjectsValueListEntry: A ProjectsValueListEntry object.
1531
1532  Fields:
1533    etag: A hash of the page of results
1534    kind: The type of list.
1535    nextPageToken: A token to request the next page of results.
1536    projects: Projects to which you have at least READ access.
1537    totalItems: The total number of projects in the list.
1538  """
1539
1540  class ProjectsValueListEntry(_messages.Message):
1541    r"""A ProjectsValueListEntry object.
1542
1543    Fields:
1544      friendlyName: A descriptive name for this project.
1545      id: An opaque ID of this project.
1546      kind: The resource type.
1547      numericId: The numeric ID of this project.
1548      projectReference: A unique reference to this project.
1549    """
1550
1551    friendlyName = _messages.StringField(1)
1552    id = _messages.StringField(2)
1553    kind = _messages.StringField(3, default='bigquery#project')
1554    numericId = _messages.IntegerField(4, variant=_messages.Variant.UINT64)
1555    projectReference = _messages.MessageField('ProjectReference', 5)
1556
1557  etag = _messages.StringField(1)
1558  kind = _messages.StringField(2, default='bigquery#projectList')
1559  nextPageToken = _messages.StringField(3)
1560  projects = _messages.MessageField('ProjectsValueListEntry', 4, repeated=True)
1561  totalItems = _messages.IntegerField(5, variant=_messages.Variant.INT32)
1562
1563
1564class ProjectReference(_messages.Message):
1565  r"""A ProjectReference object.
1566
1567  Fields:
1568    projectId: [Required] ID of the project. Can be either the numeric ID or
1569      the assigned ID of the project.
1570  """
1571
1572  projectId = _messages.StringField(1)
1573
1574
1575class QueryRequest(_messages.Message):
1576  r"""A QueryRequest object.
1577
1578  Fields:
1579    defaultDataset: [Optional] Specifies the default datasetId and projectId
1580      to assume for any unqualified table names in the query. If not set, all
1581      table names in the query string must be qualified in the format
1582      'datasetId.tableId'.
1583    dryRun: [Optional] If set to true, BigQuery doesn't run the job. Instead,
1584      if the query is valid, BigQuery returns statistics about the job such as
1585      how many bytes would be processed. If the query is invalid, an error
1586      returns. The default value is false.
1587    kind: The resource type of the request.
1588    maxResults: [Optional] The maximum number of rows of data to return per
1589      page of results. Setting this flag to a small value such as 1000 and
1590      then paging through results might improve reliability when the query
1591      result set is large. In addition to this limit, responses are also
1592      limited to 10 MB. By default, there is no maximum row count, and only
1593      the byte limit applies.
1594    preserveNulls: [Deprecated] This property is deprecated.
1595    query: [Required] A query string, following the BigQuery query syntax, of
1596      the query to execute. Example: "SELECT count(f1) FROM
1597      [myProjectId:myDatasetId.myTableId]".
1598    timeoutMs: [Optional] How long to wait for the query to complete, in
1599      milliseconds, before the request times out and returns. Note that this
1600      is only a timeout for the request, not the query. If the query takes
1601      longer to run than the timeout value, the call returns without any
1602      results and with the 'jobComplete' flag set to false. You can call
1603      GetQueryResults() to wait for the query to complete and read the
1604      results. The default value is 10000 milliseconds (10 seconds).
1605    useLegacySql: [Experimental] Specifies whether to use BigQuery's legacy
1606      SQL dialect for this query. The default value is true. If set to false,
1607      the query will use BigQuery's standard SQL:
1608      https://cloud.google.com/bigquery/sql-reference/ When useLegacySql is
1609      set to false, the values of allowLargeResults and flattenResults are
1610      ignored; query will be run as if allowLargeResults is true and
1611      flattenResults is false.
1612    useQueryCache: [Optional] Whether to look for the result in the query
1613      cache. The query cache is a best-effort cache that will be flushed
1614      whenever tables in the query are modified. The default value is true.
1615  """
1616
1617  defaultDataset = _messages.MessageField('DatasetReference', 1)
1618  dryRun = _messages.BooleanField(2)
1619  kind = _messages.StringField(3, default='bigquery#queryRequest')
1620  maxResults = _messages.IntegerField(4, variant=_messages.Variant.UINT32)
1621  preserveNulls = _messages.BooleanField(5)
1622  query = _messages.StringField(6)
1623  timeoutMs = _messages.IntegerField(7, variant=_messages.Variant.UINT32)
1624  useLegacySql = _messages.BooleanField(8)
1625  useQueryCache = _messages.BooleanField(9, default=True)
1626
1627
1628class QueryResponse(_messages.Message):
1629  r"""A QueryResponse object.
1630
1631  Fields:
1632    cacheHit: Whether the query result was fetched from the query cache.
1633    errors: [Output-only] All errors and warnings encountered during the
1634      running of the job. Errors here do not necessarily mean that the job has
1635      completed or was unsuccessful.
1636    jobComplete: Whether the query has completed or not. If rows or totalRows
1637      are present, this will always be true. If this is false, totalRows will
1638      not be available.
1639    jobReference: Reference to the Job that was created to run the query. This
1640      field will be present even if the original request timed out, in which
1641      case GetQueryResults can be used to read the results once the query has
1642      completed. Since this API only returns the first page of results,
1643      subsequent pages can be fetched via the same mechanism
1644      (GetQueryResults).
1645    kind: The resource type.
1646    numDmlAffectedRows: [Output-only, Experimental] The number of rows
1647      affected by a DML statement. Present only for DML statements INSERT,
1648      UPDATE or DELETE.
1649    pageToken: A token used for paging results.
1650    rows: An object with as many results as can be contained within the
1651      maximum permitted reply size. To get any additional rows, you can call
1652      GetQueryResults and specify the jobReference returned above.
1653    schema: The schema of the results. Present only when the query completes
1654      successfully.
1655    totalBytesProcessed: The total number of bytes processed for this query.
1656      If this query was a dry run, this is the number of bytes that would be
1657      processed if the query were run.
1658    totalRows: The total number of rows in the complete query result set,
1659      which can be more than the number of rows in this single page of
1660      results.
1661  """
1662
1663  cacheHit = _messages.BooleanField(1)
1664  errors = _messages.MessageField('ErrorProto', 2, repeated=True)
1665  jobComplete = _messages.BooleanField(3)
1666  jobReference = _messages.MessageField('JobReference', 4)
1667  kind = _messages.StringField(5, default='bigquery#queryResponse')
1668  numDmlAffectedRows = _messages.IntegerField(6)
1669  pageToken = _messages.StringField(7)
1670  rows = _messages.MessageField('TableRow', 8, repeated=True)
1671  schema = _messages.MessageField('TableSchema', 9)
1672  totalBytesProcessed = _messages.IntegerField(10)
1673  totalRows = _messages.IntegerField(11, variant=_messages.Variant.UINT64)
1674
1675
1676class StandardQueryParameters(_messages.Message):
1677  r"""Query parameters accepted by all methods.
1678
1679  Enums:
1680    AltValueValuesEnum: Data format for the response.
1681
1682  Fields:
1683    alt: Data format for the response.
1684    fields: Selector specifying which fields to include in a partial response.
1685    key: API key. Your API key identifies your project and provides you with
1686      API access, quota, and reports. Required unless you provide an OAuth 2.0
1687      token.
1688    oauth_token: OAuth 2.0 token for the current user.
1689    prettyPrint: Returns response with indentations and line breaks.
1690    quotaUser: Available to use for quota purposes for server-side
1691      applications. Can be any arbitrary string assigned to a user, but should
1692      not exceed 40 characters. Overrides userIp if both are provided.
1693    trace: A tracing token of the form "token:<tokenid>" to include in api
1694      requests.
1695    userIp: IP address of the site where the request originates. Use this if
1696      you want to enforce per-user limits.
1697  """
1698
1699  class AltValueValuesEnum(_messages.Enum):
1700    r"""Data format for the response.
1701
1702    Values:
1703      json: Responses with Content-Type of application/json
1704    """
1705    json = 0
1706
1707  alt = _messages.EnumField('AltValueValuesEnum', 1, default='json')
1708  fields = _messages.StringField(2)
1709  key = _messages.StringField(3)
1710  oauth_token = _messages.StringField(4)
1711  prettyPrint = _messages.BooleanField(5, default=True)
1712  quotaUser = _messages.StringField(6)
1713  trace = _messages.StringField(7)
1714  userIp = _messages.StringField(8)
1715
1716
1717class Streamingbuffer(_messages.Message):
1718  r"""A Streamingbuffer object.
1719
1720  Fields:
1721    estimatedBytes: [Output-only] A lower-bound estimate of the number of
1722      bytes currently in the streaming buffer.
1723    estimatedRows: [Output-only] A lower-bound estimate of the number of rows
1724      currently in the streaming buffer.
1725    oldestEntryTime: [Output-only] Contains the timestamp of the oldest entry
1726      in the streaming buffer, in milliseconds since the epoch, if the
1727      streaming buffer is available.
1728  """
1729
1730  estimatedBytes = _messages.IntegerField(1, variant=_messages.Variant.UINT64)
1731  estimatedRows = _messages.IntegerField(2, variant=_messages.Variant.UINT64)
1732  oldestEntryTime = _messages.IntegerField(3, variant=_messages.Variant.UINT64)
1733
1734
1735class Table(_messages.Message):
1736  r"""A Table object.
1737
1738  Fields:
1739    creationTime: [Output-only] The time when this table was created, in
1740      milliseconds since the epoch.
1741    description: [Optional] A user-friendly description of this table.
1742    etag: [Output-only] A hash of this resource.
1743    expirationTime: [Optional] The time when this table expires, in
1744      milliseconds since the epoch. If not present, the table will persist
1745      indefinitely. Expired tables will be deleted and their storage
1746      reclaimed.
1747    externalDataConfiguration: [Optional] Describes the data format, location,
1748      and other properties of a table stored outside of BigQuery. By defining
1749      these properties, the data source can then be queried as if it were a
1750      standard BigQuery table.
1751    friendlyName: [Optional] A descriptive name for this table.
1752    id: [Output-only] An opaque ID uniquely identifying the table.
1753    kind: [Output-only] The type of the resource.
1754    lastModifiedTime: [Output-only] The time when this table was last
1755      modified, in milliseconds since the epoch.
1756    location: [Output-only] The geographic location where the table resides.
1757      This value is inherited from the dataset.
1758    numBytes: [Output-only] The size of this table in bytes, excluding any
1759      data in the streaming buffer.
1760    numLongTermBytes: [Output-only] The number of bytes in the table that are
1761      considered "long-term storage".
1762    numRows: [Output-only] The number of rows of data in this table, excluding
1763      any data in the streaming buffer.
1764    schema: [Optional] Describes the schema of this table.
1765    selfLink: [Output-only] A URL that can be used to access this resource
1766      again.
1767    streamingBuffer: [Output-only] Contains information regarding this table's
1768      streaming buffer, if one is present. This field will be absent if the
1769      table is not being streamed to or if there is no data in the streaming
1770      buffer.
1771    tableReference: [Required] Reference describing the ID of this table.
1772    timePartitioning: [Experimental] If specified, configures time-based
1773      partitioning for this table.
1774    type: [Output-only] Describes the table type. The following values are
1775      supported: TABLE: A normal BigQuery table. VIEW: A virtual table defined
1776      by a SQL query. EXTERNAL: A table that references data stored in an
1777      external storage system, such as Google Cloud Storage. The default value
1778      is TABLE.
1779    view: [Optional] The view definition.
1780  """
1781
1782  creationTime = _messages.IntegerField(1)
1783  description = _messages.StringField(2)
1784  etag = _messages.StringField(3)
1785  expirationTime = _messages.IntegerField(4)
1786  externalDataConfiguration = _messages.MessageField('ExternalDataConfiguration', 5)
1787  friendlyName = _messages.StringField(6)
1788  id = _messages.StringField(7)
1789  kind = _messages.StringField(8, default='bigquery#table')
1790  lastModifiedTime = _messages.IntegerField(9, variant=_messages.Variant.UINT64)
1791  location = _messages.StringField(10)
1792  numBytes = _messages.IntegerField(11)
1793  numLongTermBytes = _messages.IntegerField(12)
1794  numRows = _messages.IntegerField(13, variant=_messages.Variant.UINT64)
1795  schema = _messages.MessageField('TableSchema', 14)
1796  selfLink = _messages.StringField(15)
1797  streamingBuffer = _messages.MessageField('Streamingbuffer', 16)
1798  tableReference = _messages.MessageField('TableReference', 17)
1799  timePartitioning = _messages.MessageField('TimePartitioning', 18)
1800  type = _messages.StringField(19)
1801  view = _messages.MessageField('ViewDefinition', 20)
1802
1803
1804class TableCell(_messages.Message):
1805  r"""A TableCell object.
1806
1807  Fields:
1808    v: A extra_types.JsonValue attribute.
1809  """
1810
1811  v = _messages.MessageField('extra_types.JsonValue', 1)
1812
1813
1814class TableDataInsertAllRequest(_messages.Message):
1815  r"""A TableDataInsertAllRequest object.
1816
1817  Messages:
1818    RowsValueListEntry: A RowsValueListEntry object.
1819
1820  Fields:
1821    ignoreUnknownValues: [Optional] Accept rows that contain values that do
1822      not match the schema. The unknown values are ignored. Default is false,
1823      which treats unknown values as errors.
1824    kind: The resource type of the response.
1825    rows: The rows to insert.
1826    skipInvalidRows: [Optional] Insert all valid rows of a request, even if
1827      invalid rows exist. The default value is false, which causes the entire
1828      request to fail if any invalid rows exist.
1829    templateSuffix: [Experimental] If specified, treats the destination table
1830      as a base template, and inserts the rows into an instance table named
1831      "{destination}{templateSuffix}". BigQuery will manage creation of the
1832      instance table, using the schema of the base template table. See
1833      https://cloud.google.com/bigquery/streaming-data-into-bigquery#template-
1834      tables for considerations when working with templates tables.
1835  """
1836
1837  class RowsValueListEntry(_messages.Message):
1838    r"""A RowsValueListEntry object.
1839
1840    Fields:
1841      insertId: [Optional] A unique ID for each row. BigQuery uses this
1842        property to detect duplicate insertion requests on a best-effort
1843        basis.
1844      json: [Required] A JSON object that contains a row of data. The object's
1845        properties and values must match the destination table's schema.
1846    """
1847
1848    insertId = _messages.StringField(1)
1849    json = _messages.MessageField('JsonObject', 2)
1850
1851  ignoreUnknownValues = _messages.BooleanField(1)
1852  kind = _messages.StringField(2, default='bigquery#tableDataInsertAllRequest')
1853  rows = _messages.MessageField('RowsValueListEntry', 3, repeated=True)
1854  skipInvalidRows = _messages.BooleanField(4)
1855  templateSuffix = _messages.StringField(5)
1856
1857
1858class TableDataInsertAllResponse(_messages.Message):
1859  r"""A TableDataInsertAllResponse object.
1860
1861  Messages:
1862    InsertErrorsValueListEntry: A InsertErrorsValueListEntry object.
1863
1864  Fields:
1865    insertErrors: An array of errors for rows that were not inserted.
1866    kind: The resource type of the response.
1867  """
1868
1869  class InsertErrorsValueListEntry(_messages.Message):
1870    r"""A InsertErrorsValueListEntry object.
1871
1872    Fields:
1873      errors: Error information for the row indicated by the index property.
1874      index: The index of the row that error applies to.
1875    """
1876
1877    errors = _messages.MessageField('ErrorProto', 1, repeated=True)
1878    index = _messages.IntegerField(2, variant=_messages.Variant.UINT32)
1879
1880  insertErrors = _messages.MessageField('InsertErrorsValueListEntry', 1, repeated=True)
1881  kind = _messages.StringField(2, default='bigquery#tableDataInsertAllResponse')
1882
1883
1884class TableDataList(_messages.Message):
1885  r"""A TableDataList object.
1886
1887  Fields:
1888    etag: A hash of this page of results.
1889    kind: The resource type of the response.
1890    pageToken: A token used for paging results. Providing this token instead
1891      of the startIndex parameter can help you retrieve stable results when an
1892      underlying table is changing.
1893    rows: Rows of results.
1894    totalRows: The total number of rows in the complete table.
1895  """
1896
1897  etag = _messages.StringField(1)
1898  kind = _messages.StringField(2, default='bigquery#tableDataList')
1899  pageToken = _messages.StringField(3)
1900  rows = _messages.MessageField('TableRow', 4, repeated=True)
1901  totalRows = _messages.IntegerField(5)
1902
1903
1904class TableFieldSchema(_messages.Message):
1905  r"""A TableFieldSchema object.
1906
1907  Fields:
1908    description: [Optional] The field description. The maximum length is 16K
1909      characters.
1910    fields: [Optional] Describes the nested schema fields if the type property
1911      is set to RECORD.
1912    mode: [Optional] The field mode. Possible values include NULLABLE,
1913      REQUIRED and REPEATED. The default value is NULLABLE.
1914    name: [Required] The field name. The name must contain only letters (a-z,
1915      A-Z), numbers (0-9), or underscores (_), and must start with a letter or
1916      underscore. The maximum length is 128 characters.
1917    type: [Required] The field data type. Possible values include STRING,
1918      BYTES, INTEGER, FLOAT, BOOLEAN, TIMESTAMP or RECORD (where RECORD
1919      indicates that the field contains a nested schema).
1920  """
1921
1922  description = _messages.StringField(1)
1923  fields = _messages.MessageField('TableFieldSchema', 2, repeated=True)
1924  mode = _messages.StringField(3)
1925  name = _messages.StringField(4)
1926  type = _messages.StringField(5)
1927
1928
1929class TableList(_messages.Message):
1930  r"""A TableList object.
1931
1932  Messages:
1933    TablesValueListEntry: A TablesValueListEntry object.
1934
1935  Fields:
1936    etag: A hash of this page of results.
1937    kind: The type of list.
1938    nextPageToken: A token to request the next page of results.
1939    tables: Tables in the requested dataset.
1940    totalItems: The total number of tables in the dataset.
1941  """
1942
1943  class TablesValueListEntry(_messages.Message):
1944    r"""A TablesValueListEntry object.
1945
1946    Fields:
1947      friendlyName: The user-friendly name for this table.
1948      id: An opaque ID of the table
1949      kind: The resource type.
1950      tableReference: A reference uniquely identifying the table.
1951      type: The type of table. Possible values are: TABLE, VIEW.
1952    """
1953
1954    friendlyName = _messages.StringField(1)
1955    id = _messages.StringField(2)
1956    kind = _messages.StringField(3, default='bigquery#table')
1957    tableReference = _messages.MessageField('TableReference', 4)
1958    type = _messages.StringField(5)
1959
1960  etag = _messages.StringField(1)
1961  kind = _messages.StringField(2, default='bigquery#tableList')
1962  nextPageToken = _messages.StringField(3)
1963  tables = _messages.MessageField('TablesValueListEntry', 4, repeated=True)
1964  totalItems = _messages.IntegerField(5, variant=_messages.Variant.INT32)
1965
1966
1967class TableReference(_messages.Message):
1968  r"""A TableReference object.
1969
1970  Fields:
1971    datasetId: [Required] The ID of the dataset containing this table.
1972    projectId: [Required] The ID of the project containing this table.
1973    tableId: [Required] The ID of the table. The ID must contain only letters
1974      (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is
1975      1,024 characters.
1976  """
1977
1978  datasetId = _messages.StringField(1)
1979  projectId = _messages.StringField(2)
1980  tableId = _messages.StringField(3)
1981
1982
1983class TableRow(_messages.Message):
1984  r"""A TableRow object.
1985
1986  Fields:
1987    f: Represents a single row in the result set, consisting of one or more
1988      fields.
1989  """
1990
1991  f = _messages.MessageField('TableCell', 1, repeated=True)
1992
1993
1994class TableSchema(_messages.Message):
1995  r"""A TableSchema object.
1996
1997  Fields:
1998    fields: Describes the fields in a table.
1999  """
2000
2001  fields = _messages.MessageField('TableFieldSchema', 1, repeated=True)
2002
2003
2004class TimePartitioning(_messages.Message):
2005  r"""A TimePartitioning object.
2006
2007  Fields:
2008    expirationMs: [Optional] Number of milliseconds for which to keep the
2009      storage for a partition.
2010    type: [Required] The only type supported is DAY, which will generate one
2011      partition per day based on data loading time.
2012  """
2013
2014  expirationMs = _messages.IntegerField(1)
2015  type = _messages.StringField(2)
2016
2017
2018class UserDefinedFunctionResource(_messages.Message):
2019  r"""A UserDefinedFunctionResource object.
2020
2021  Fields:
2022    inlineCode: [Pick one] An inline resource that contains code for a user-
2023      defined function (UDF). Providing a inline code resource is equivalent
2024      to providing a URI for a file containing the same code.
2025    resourceUri: [Pick one] A code resource to load from a Google Cloud
2026      Storage URI (gs://bucket/path).
2027  """
2028
2029  inlineCode = _messages.StringField(1)
2030  resourceUri = _messages.StringField(2)
2031
2032
2033class ViewDefinition(_messages.Message):
2034  r"""A ViewDefinition object.
2035
2036  Fields:
2037    query: [Required] A query that BigQuery executes when the view is
2038      referenced.
2039    useLegacySql: [Experimental] Specifies whether to use BigQuery's legacy
2040      SQL for this view. The default value is true. If set to false, the view
2041      will use BigQuery's standard SQL: https://cloud.google.com/bigquery/sql-
2042      reference/ Queries and views that reference this view must use the same
2043      flag value.
2044    userDefinedFunctionResources: [Experimental] Describes user-defined
2045      function resources used in the query.
2046  """
2047
2048  query = _messages.StringField(1)
2049  useLegacySql = _messages.BooleanField(2)
2050  userDefinedFunctionResources = _messages.MessageField('UserDefinedFunctionResource', 3, repeated=True)
2051
2052
2053