| OLD | NEW |
| 1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
| 2 | 2 |
| 3 library googleapis.bigquery.v2; | 3 library googleapis.bigquery.v2; |
| 4 | 4 |
| 5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
| 6 import 'dart:collection' as collection; | 6 import 'dart:collection' as collection; |
| 7 import 'dart:async' as async; | 7 import 'dart:async' as async; |
| 8 import 'dart:convert' as convert; | 8 import 'dart:convert' as convert; |
| 9 | 9 |
| 10 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 10 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
| 11 import 'package:crypto/crypto.dart' as crypto; |
| 11 import 'package:http/http.dart' as http; | 12 import 'package:http/http.dart' as http; |
| 12 | 13 |
| 13 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show | 14 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show |
| 14 ApiRequestError, DetailedApiRequestError, Media, UploadOptions, | 15 ApiRequestError, DetailedApiRequestError, Media, UploadOptions, |
| 15 ResumableUploadOptions, DownloadOptions, PartialDownloadOptions, | 16 ResumableUploadOptions, DownloadOptions, PartialDownloadOptions, |
| 16 ByteRange; | 17 ByteRange; |
| 17 | 18 |
| 18 const core.String USER_AGENT = 'dart-api-client bigquery/v2'; | 19 const core.String USER_AGENT = 'dart-api-client bigquery/v2'; |
| 19 | 20 |
| 20 /** A data platform for customers to create, manage, share and query data. */ | 21 /** A data platform for customers to create, manage, share and query data. */ |
| (...skipping 1193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1214 uploadOptions: _uploadOptions, | 1215 uploadOptions: _uploadOptions, |
| 1215 uploadMedia: _uploadMedia, | 1216 uploadMedia: _uploadMedia, |
| 1216 downloadOptions: _downloadOptions); | 1217 downloadOptions: _downloadOptions); |
| 1217 return _response.then((data) => new Table.fromJson(data)); | 1218 return _response.then((data) => new Table.fromJson(data)); |
| 1218 } | 1219 } |
| 1219 | 1220 |
| 1220 } | 1221 } |
| 1221 | 1222 |
| 1222 | 1223 |
| 1223 | 1224 |
| 1225 class BigtableColumn { |
| 1226 /** |
| 1227 * [Optional] The encoding of the values when the type is not STRING. |
| 1228 * Acceptable encoding values are: TEXT - indicates values are alphanumeric |
| 1229 * text strings. BINARY - indicates values are encoded using HBase |
| 1230 * Bytes.toBytes family of functions. 'encoding' can also be set at the column |
| 1231 * family level. However, the setting at this level takes precedence if |
| 1232 * 'encoding' is set at both levels. |
| 1233 */ |
| 1234 core.String encoding; |
| 1235 /** |
| 1236 * [Optional] If the qualifier is not a valid BigQuery field identifier i.e. |
| 1237 * does not match [a-zA-Z][a-zA-Z0-9_]*, a valid identifier must be provided |
| 1238 * as the column field name and is used as field name in queries. |
| 1239 */ |
| 1240 core.String fieldName; |
| 1241 /** |
| 1242 * [Optional] If this is set, only the latest version of value in this column |
| 1243 * are exposed. 'onlyReadLatest' can also be set at the column family level. |
| 1244 * However, the setting at this level takes precedence if 'onlyReadLatest' is |
| 1245 * set at both levels. |
| 1246 */ |
| 1247 core.bool onlyReadLatest; |
| 1248 /** |
| 1249 * [Required] Qualifier of the column. Columns in the parent column family |
| 1250 * that has this exact qualifier are exposed as . field. If the qualifier is |
| 1251 * valid UTF-8 string, it can be specified in the qualifier_string field. |
| 1252 * Otherwise, a base-64 encoded value must be set to qualifier_encoded. The |
| 1253 * column field name is the same as the column qualifier. However, if the |
| 1254 * qualifier is not a valid BigQuery field identifier i.e. does not match |
| 1255 * [a-zA-Z][a-zA-Z0-9_]*, a valid identifier must be provided as field_name. |
| 1256 */ |
| 1257 core.String qualifierEncoded; |
| 1258 core.List<core.int> get qualifierEncodedAsBytes { |
| 1259 return crypto.CryptoUtils.base64StringToBytes(qualifierEncoded); |
| 1260 } |
| 1261 |
| 1262 void set qualifierEncodedAsBytes(core.List<core.int> _bytes) { |
| 1263 qualifierEncoded = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); |
| 1264 } |
| 1265 core.String qualifierString; |
| 1266 /** |
| 1267 * [Optional] The type to convert the value in cells of this column. The |
| 1268 * values are expected to be encoded using HBase Bytes.toBytes function when |
| 1269 * using the BINARY encoding value. Following BigQuery types are allowed |
| 1270 * (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Defaut type is BYTES. |
| 1271 * 'type' can also be set at the column family level. However, the setting at |
| 1272 * this level takes precedence if 'type' is set at both levels. |
| 1273 */ |
| 1274 core.String type; |
| 1275 |
| 1276 BigtableColumn(); |
| 1277 |
| 1278 BigtableColumn.fromJson(core.Map _json) { |
| 1279 if (_json.containsKey("encoding")) { |
| 1280 encoding = _json["encoding"]; |
| 1281 } |
| 1282 if (_json.containsKey("fieldName")) { |
| 1283 fieldName = _json["fieldName"]; |
| 1284 } |
| 1285 if (_json.containsKey("onlyReadLatest")) { |
| 1286 onlyReadLatest = _json["onlyReadLatest"]; |
| 1287 } |
| 1288 if (_json.containsKey("qualifierEncoded")) { |
| 1289 qualifierEncoded = _json["qualifierEncoded"]; |
| 1290 } |
| 1291 if (_json.containsKey("qualifierString")) { |
| 1292 qualifierString = _json["qualifierString"]; |
| 1293 } |
| 1294 if (_json.containsKey("type")) { |
| 1295 type = _json["type"]; |
| 1296 } |
| 1297 } |
| 1298 |
| 1299 core.Map toJson() { |
| 1300 var _json = new core.Map(); |
| 1301 if (encoding != null) { |
| 1302 _json["encoding"] = encoding; |
| 1303 } |
| 1304 if (fieldName != null) { |
| 1305 _json["fieldName"] = fieldName; |
| 1306 } |
| 1307 if (onlyReadLatest != null) { |
| 1308 _json["onlyReadLatest"] = onlyReadLatest; |
| 1309 } |
| 1310 if (qualifierEncoded != null) { |
| 1311 _json["qualifierEncoded"] = qualifierEncoded; |
| 1312 } |
| 1313 if (qualifierString != null) { |
| 1314 _json["qualifierString"] = qualifierString; |
| 1315 } |
| 1316 if (type != null) { |
| 1317 _json["type"] = type; |
| 1318 } |
| 1319 return _json; |
| 1320 } |
| 1321 } |
| 1322 |
| 1323 class BigtableColumnFamily { |
| 1324 /** |
| 1325 * [Optional] Lists of columns that should be exposed as individual fields as |
| 1326 * opposed to a list of (column name, value) pairs. All columns whose |
| 1327 * qualifier matches a qualifier in this list can be accessed as .. Other |
| 1328 * columns can be accessed as a list through .Column field. |
| 1329 */ |
| 1330 core.List<BigtableColumn> columns; |
| 1331 /** |
| 1332 * [Optional] The encoding of the values when the type is not STRING. |
| 1333 * Acceptable encoding values are: TEXT - indicates values are alphanumeric |
| 1334 * text strings. BINARY - indicates values are encoded using HBase |
| 1335 * Bytes.toBytes family of functions. This can be overridden for a specific |
| 1336 * column by listing that column in 'columns' and specifying an encoding for |
| 1337 * it. |
| 1338 */ |
| 1339 core.String encoding; |
| 1340 /** Identifier of the column family. */ |
| 1341 core.String familyId; |
| 1342 /** |
| 1343 * [Optional] If this is set only the latest version of value are exposed for |
| 1344 * all columns in this column family. This can be overridden for a specific |
| 1345 * column by listing that column in 'columns' and specifying a different |
| 1346 * setting for that column. |
| 1347 */ |
| 1348 core.bool onlyReadLatest; |
| 1349 /** |
| 1350 * [Optional] The type to convert the value in cells of this column family. |
| 1351 * The values are expected to be encoded using HBase Bytes.toBytes function |
| 1352 * when using the BINARY encoding value. Following BigQuery types are allowed |
| 1353 * (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Defaut type is BYTES. |
| 1354 * This can be overridden for a specific column by listing that column in |
| 1355 * 'columns' and specifying a type for it. |
| 1356 */ |
| 1357 core.String type; |
| 1358 |
| 1359 BigtableColumnFamily(); |
| 1360 |
| 1361 BigtableColumnFamily.fromJson(core.Map _json) { |
| 1362 if (_json.containsKey("columns")) { |
| 1363 columns = _json["columns"].map((value) => new BigtableColumn.fromJson(valu
e)).toList(); |
| 1364 } |
| 1365 if (_json.containsKey("encoding")) { |
| 1366 encoding = _json["encoding"]; |
| 1367 } |
| 1368 if (_json.containsKey("familyId")) { |
| 1369 familyId = _json["familyId"]; |
| 1370 } |
| 1371 if (_json.containsKey("onlyReadLatest")) { |
| 1372 onlyReadLatest = _json["onlyReadLatest"]; |
| 1373 } |
| 1374 if (_json.containsKey("type")) { |
| 1375 type = _json["type"]; |
| 1376 } |
| 1377 } |
| 1378 |
| 1379 core.Map toJson() { |
| 1380 var _json = new core.Map(); |
| 1381 if (columns != null) { |
| 1382 _json["columns"] = columns.map((value) => (value).toJson()).toList(); |
| 1383 } |
| 1384 if (encoding != null) { |
| 1385 _json["encoding"] = encoding; |
| 1386 } |
| 1387 if (familyId != null) { |
| 1388 _json["familyId"] = familyId; |
| 1389 } |
| 1390 if (onlyReadLatest != null) { |
| 1391 _json["onlyReadLatest"] = onlyReadLatest; |
| 1392 } |
| 1393 if (type != null) { |
| 1394 _json["type"] = type; |
| 1395 } |
| 1396 return _json; |
| 1397 } |
| 1398 } |
| 1399 |
| 1400 class BigtableOptions { |
| 1401 /** |
| 1402 * [Optional] List of column families to expose in the table schema along with |
| 1403 * their types. This list restricts the column families that can be referenced |
| 1404 * in queries and specifies their value types. You can use this list to do |
| 1405 * type conversions - see the 'type' field for more details. If you leave this |
| 1406 * list empty, all column families are present in the table schema and their |
| 1407 * values are read as BYTES. During a query only the column families |
| 1408 * referenced in that query are read from Bigtable. |
| 1409 */ |
| 1410 core.List<BigtableColumnFamily> columnFamilies; |
| 1411 /** |
| 1412 * [Optional] If field is true, then the column families that are not |
| 1413 * specified in columnFamilies list are not exposed in the table schema. |
| 1414 * Otherwise, they are read with BYTES type values. The default value is |
| 1415 * false. |
| 1416 */ |
| 1417 core.bool ignoreUnspecifiedColumnFamilies; |
| 1418 |
| 1419 BigtableOptions(); |
| 1420 |
| 1421 BigtableOptions.fromJson(core.Map _json) { |
| 1422 if (_json.containsKey("columnFamilies")) { |
| 1423 columnFamilies = _json["columnFamilies"].map((value) => new BigtableColumn
Family.fromJson(value)).toList(); |
| 1424 } |
| 1425 if (_json.containsKey("ignoreUnspecifiedColumnFamilies")) { |
| 1426 ignoreUnspecifiedColumnFamilies = _json["ignoreUnspecifiedColumnFamilies"]
; |
| 1427 } |
| 1428 } |
| 1429 |
| 1430 core.Map toJson() { |
| 1431 var _json = new core.Map(); |
| 1432 if (columnFamilies != null) { |
| 1433 _json["columnFamilies"] = columnFamilies.map((value) => (value).toJson()).
toList(); |
| 1434 } |
| 1435 if (ignoreUnspecifiedColumnFamilies != null) { |
| 1436 _json["ignoreUnspecifiedColumnFamilies"] = ignoreUnspecifiedColumnFamilies
; |
| 1437 } |
| 1438 return _json; |
| 1439 } |
| 1440 } |
| 1441 |
| 1224 class CsvOptions { | 1442 class CsvOptions { |
| 1225 /** | 1443 /** |
| 1226 * [Optional] Indicates if BigQuery should accept rows that are missing | 1444 * [Optional] Indicates if BigQuery should accept rows that are missing |
| 1227 * trailing optional columns. If true, BigQuery treats missing trailing | 1445 * trailing optional columns. If true, BigQuery treats missing trailing |
| 1228 * columns as null values. If false, records with missing trailing columns are | 1446 * columns as null values. If false, records with missing trailing columns are |
| 1229 * treated as bad records, and if there are too many bad records, an invalid | 1447 * treated as bad records, and if there are too many bad records, an invalid |
| 1230 * error is returned in the job result. The default value is false. | 1448 * error is returned in the job result. The default value is false. |
| 1231 */ | 1449 */ |
| 1232 core.bool allowJaggedRows; | 1450 core.bool allowJaggedRows; |
| 1233 /** | 1451 /** |
| (...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1881 } | 2099 } |
| 1882 if (substeps != null) { | 2100 if (substeps != null) { |
| 1883 _json["substeps"] = substeps; | 2101 _json["substeps"] = substeps; |
| 1884 } | 2102 } |
| 1885 return _json; | 2103 return _json; |
| 1886 } | 2104 } |
| 1887 } | 2105 } |
| 1888 | 2106 |
| 1889 class ExternalDataConfiguration { | 2107 class ExternalDataConfiguration { |
| 1890 /** | 2108 /** |
| 2109 * [Experimental] Try to detect schema and format options automatically. Any |
| 2110 * option specified explicitly will be honored. |
| 2111 */ |
| 2112 core.bool autodetect; |
| 2113 /** [Optional] Additional options if sourceFormat is set to BIGTABLE. */ |
| 2114 BigtableOptions bigtableOptions; |
| 2115 /** |
| 1891 * [Optional] The compression type of the data source. Possible values include | 2116 * [Optional] The compression type of the data source. Possible values include |
| 1892 * GZIP and NONE. The default value is NONE. This setting is ignored for | 2117 * GZIP and NONE. The default value is NONE. This setting is ignored for |
| 1893 * Google Cloud Datastore backups. | 2118 * Google Cloud Bigtable, Google Cloud Datastore backups and Avro formats. |
| 1894 */ | 2119 */ |
| 1895 core.String compression; | 2120 core.String compression; |
| 1896 /** Additional properties to set if sourceFormat is set to CSV. */ | 2121 /** Additional properties to set if sourceFormat is set to CSV. */ |
| 1897 CsvOptions csvOptions; | 2122 CsvOptions csvOptions; |
| 1898 /** | 2123 /** |
| 1899 * [Optional] Indicates if BigQuery should allow extra values that are not | 2124 * [Optional] Indicates if BigQuery should allow extra values that are not |
| 1900 * represented in the table schema. If true, the extra values are ignored. If | 2125 * represented in the table schema. If true, the extra values are ignored. If |
| 1901 * false, records with extra columns are treated as bad records, and if there | 2126 * false, records with extra columns are treated as bad records, and if there |
| 1902 * are too many bad records, an invalid error is returned in the job result. | 2127 * are too many bad records, an invalid error is returned in the job result. |
| 1903 * The default value is false. The sourceFormat property determines what | 2128 * The default value is false. The sourceFormat property determines what |
| 1904 * BigQuery treats as an extra value: CSV: Trailing columns JSON: Named values | 2129 * BigQuery treats as an extra value: CSV: Trailing columns JSON: Named values |
| 1905 * that don't match any column names Google Cloud Datastore backups: This | 2130 * that don't match any column names Google Cloud Bigtable: This setting is |
| 1906 * setting is ignored. | 2131 * ignored. Google Cloud Datastore backups: This setting is ignored. Avro: |
| 2132 * This setting is ignored. |
| 1907 */ | 2133 */ |
| 1908 core.bool ignoreUnknownValues; | 2134 core.bool ignoreUnknownValues; |
| 1909 /** | 2135 /** |
| 1910 * [Optional] The maximum number of bad records that BigQuery can ignore when | 2136 * [Optional] The maximum number of bad records that BigQuery can ignore when |
| 1911 * reading data. If the number of bad records exceeds this value, an invalid | 2137 * reading data. If the number of bad records exceeds this value, an invalid |
| 1912 * error is returned in the job result. The default value is 0, which requires | 2138 * error is returned in the job result. The default value is 0, which requires |
| 1913 * that all records are valid. This setting is ignored for Google Cloud | 2139 * that all records are valid. This setting is ignored for Google Cloud |
| 1914 * Datastore backups. | 2140 * Bigtable, Google Cloud Datastore backups and Avro formats. |
| 1915 */ | 2141 */ |
| 1916 core.int maxBadRecords; | 2142 core.int maxBadRecords; |
| 1917 /** | 2143 /** |
| 1918 * [Optional] The schema for the data. Schema is required for CSV and JSON | 2144 * [Optional] The schema for the data. Schema is required for CSV and JSON |
| 1919 * formats. Schema is disallowed for Google Cloud Datastore backups. | 2145 * formats. Schema is disallowed for Google Cloud Bigtable, Cloud Datastore |
| 2146 * backups, and Avro formats. |
| 1920 */ | 2147 */ |
| 1921 TableSchema schema; | 2148 TableSchema schema; |
| 1922 /** | 2149 /** |
| 1923 * [Required] The data format. For CSV files, specify "CSV". For | 2150 * [Required] The data format. For CSV files, specify "CSV". For |
| 1924 * newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON". For Google Cloud | 2151 * newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON". For Avro files, |
| 1925 * Datastore backups, specify "DATASTORE_BACKUP". | 2152 * specify "AVRO". For Google Cloud Datastore backups, specify |
| 2153 * "DATASTORE_BACKUP". [Experimental] For Google Cloud Bigtable, specify |
| 2154 * "BIGTABLE". Please note that reading from Google Cloud Bigtable is |
| 2155 * experimental and has to be enabled for your project. Please contact Google |
| 2156 * Cloud Support to enable this for your project. |
| 1926 */ | 2157 */ |
| 1927 core.String sourceFormat; | 2158 core.String sourceFormat; |
| 1928 /** | 2159 /** |
| 1929 * [Required] The fully-qualified URIs that point to your data in Google Cloud | 2160 * [Required] The fully-qualified URIs that point to your data in Google |
| 1930 * Storage. Each URI can contain one '*' wildcard character and it must come | 2161 * Cloud. For Google Cloud Storage URIs: Each URI can contain one '*' wildcard |
| 1931 * after the 'bucket' name. Size limits related to load jobs apply to external | 2162 * character and it must come after the 'bucket' name. Size limits related to |
| 1932 * data sources, plus an additional limit of 10 GB maximum size across all | 2163 * load jobs apply to external data sources, plus an additional limit of 10 GB |
| 1933 * URIs. For Google Cloud Datastore backups, exactly one URI can be specified, | 2164 * maximum size across all URIs. For Google Cloud Bigtable URIs: Exactly one |
| 1934 * and it must end with '.backup_info'. Also, the '*' wildcard character is | 2165 * URI can be specified and it has be a fully specified and valid HTTPS URL |
| 1935 * not allowed. | 2166 * for a Google Cloud Bigtable table. For Google Cloud Datastore backups, |
| 2167 * exactly one URI can be specified, and it must end with '.backup_info'. |
| 2168 * Also, the '*' wildcard character is not allowed. |
| 1936 */ | 2169 */ |
| 1937 core.List<core.String> sourceUris; | 2170 core.List<core.String> sourceUris; |
| 1938 | 2171 |
| 1939 ExternalDataConfiguration(); | 2172 ExternalDataConfiguration(); |
| 1940 | 2173 |
| 1941 ExternalDataConfiguration.fromJson(core.Map _json) { | 2174 ExternalDataConfiguration.fromJson(core.Map _json) { |
| 2175 if (_json.containsKey("autodetect")) { |
| 2176 autodetect = _json["autodetect"]; |
| 2177 } |
| 2178 if (_json.containsKey("bigtableOptions")) { |
| 2179 bigtableOptions = new BigtableOptions.fromJson(_json["bigtableOptions"]); |
| 2180 } |
| 1942 if (_json.containsKey("compression")) { | 2181 if (_json.containsKey("compression")) { |
| 1943 compression = _json["compression"]; | 2182 compression = _json["compression"]; |
| 1944 } | 2183 } |
| 1945 if (_json.containsKey("csvOptions")) { | 2184 if (_json.containsKey("csvOptions")) { |
| 1946 csvOptions = new CsvOptions.fromJson(_json["csvOptions"]); | 2185 csvOptions = new CsvOptions.fromJson(_json["csvOptions"]); |
| 1947 } | 2186 } |
| 1948 if (_json.containsKey("ignoreUnknownValues")) { | 2187 if (_json.containsKey("ignoreUnknownValues")) { |
| 1949 ignoreUnknownValues = _json["ignoreUnknownValues"]; | 2188 ignoreUnknownValues = _json["ignoreUnknownValues"]; |
| 1950 } | 2189 } |
| 1951 if (_json.containsKey("maxBadRecords")) { | 2190 if (_json.containsKey("maxBadRecords")) { |
| 1952 maxBadRecords = _json["maxBadRecords"]; | 2191 maxBadRecords = _json["maxBadRecords"]; |
| 1953 } | 2192 } |
| 1954 if (_json.containsKey("schema")) { | 2193 if (_json.containsKey("schema")) { |
| 1955 schema = new TableSchema.fromJson(_json["schema"]); | 2194 schema = new TableSchema.fromJson(_json["schema"]); |
| 1956 } | 2195 } |
| 1957 if (_json.containsKey("sourceFormat")) { | 2196 if (_json.containsKey("sourceFormat")) { |
| 1958 sourceFormat = _json["sourceFormat"]; | 2197 sourceFormat = _json["sourceFormat"]; |
| 1959 } | 2198 } |
| 1960 if (_json.containsKey("sourceUris")) { | 2199 if (_json.containsKey("sourceUris")) { |
| 1961 sourceUris = _json["sourceUris"]; | 2200 sourceUris = _json["sourceUris"]; |
| 1962 } | 2201 } |
| 1963 } | 2202 } |
| 1964 | 2203 |
| 1965 core.Map toJson() { | 2204 core.Map toJson() { |
| 1966 var _json = new core.Map(); | 2205 var _json = new core.Map(); |
| 2206 if (autodetect != null) { |
| 2207 _json["autodetect"] = autodetect; |
| 2208 } |
| 2209 if (bigtableOptions != null) { |
| 2210 _json["bigtableOptions"] = (bigtableOptions).toJson(); |
| 2211 } |
| 1967 if (compression != null) { | 2212 if (compression != null) { |
| 1968 _json["compression"] = compression; | 2213 _json["compression"] = compression; |
| 1969 } | 2214 } |
| 1970 if (csvOptions != null) { | 2215 if (csvOptions != null) { |
| 1971 _json["csvOptions"] = (csvOptions).toJson(); | 2216 _json["csvOptions"] = (csvOptions).toJson(); |
| 1972 } | 2217 } |
| 1973 if (ignoreUnknownValues != null) { | 2218 if (ignoreUnknownValues != null) { |
| 1974 _json["ignoreUnknownValues"] = ignoreUnknownValues; | 2219 _json["ignoreUnknownValues"] = ignoreUnknownValues; |
| 1975 } | 2220 } |
| 1976 if (maxBadRecords != null) { | 2221 if (maxBadRecords != null) { |
| (...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2666 /** [Required] BigQuery SQL query to execute. */ | 2911 /** [Required] BigQuery SQL query to execute. */ |
| 2667 core.String query; | 2912 core.String query; |
| 2668 /** | 2913 /** |
| 2669 * [Optional] If querying an external data source outside of BigQuery, | 2914 * [Optional] If querying an external data source outside of BigQuery, |
| 2670 * describes the data format, location and other properties of the data | 2915 * describes the data format, location and other properties of the data |
| 2671 * source. By defining these properties, the data source can then be queried | 2916 * source. By defining these properties, the data source can then be queried |
| 2672 * as if it were a standard BigQuery table. | 2917 * as if it were a standard BigQuery table. |
| 2673 */ | 2918 */ |
| 2674 core.Map<core.String, ExternalDataConfiguration> tableDefinitions; | 2919 core.Map<core.String, ExternalDataConfiguration> tableDefinitions; |
| 2675 /** | 2920 /** |
| 2921 * [Experimental] Specifies whether to use BigQuery's legacy SQL dialect for |
| 2922 * this query. The default value is true. If set to false, the query will use |
| 2923 * BigQuery's updated SQL dialect with improved standards compliance. When |
| 2924 * using BigQuery's updated SQL, the values of allowLargeResults and |
| 2925 * flattenResults are ignored. Queries with useLegacySql set to false will be |
| 2926 * run as if allowLargeResults is true and flattenResults is false. |
| 2927 */ |
| 2928 core.bool useLegacySql; |
| 2929 /** |
| 2676 * [Optional] Whether to look for the result in the query cache. The query | 2930 * [Optional] Whether to look for the result in the query cache. The query |
| 2677 * cache is a best-effort cache that will be flushed whenever tables in the | 2931 * cache is a best-effort cache that will be flushed whenever tables in the |
| 2678 * query are modified. Moreover, the query cache is only available when a | 2932 * query are modified. Moreover, the query cache is only available when a |
| 2679 * query does not have a destination table specified. The default value is | 2933 * query does not have a destination table specified. The default value is |
| 2680 * true. | 2934 * true. |
| 2681 */ | 2935 */ |
| 2682 core.bool useQueryCache; | 2936 core.bool useQueryCache; |
| 2683 /** | 2937 /** |
| 2684 * [Experimental] Describes user-defined function resources used in the query. | 2938 * [Experimental] Describes user-defined function resources used in the query. |
| 2685 */ | 2939 */ |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2723 } | 2977 } |
| 2724 if (_json.containsKey("priority")) { | 2978 if (_json.containsKey("priority")) { |
| 2725 priority = _json["priority"]; | 2979 priority = _json["priority"]; |
| 2726 } | 2980 } |
| 2727 if (_json.containsKey("query")) { | 2981 if (_json.containsKey("query")) { |
| 2728 query = _json["query"]; | 2982 query = _json["query"]; |
| 2729 } | 2983 } |
| 2730 if (_json.containsKey("tableDefinitions")) { | 2984 if (_json.containsKey("tableDefinitions")) { |
| 2731 tableDefinitions = commons.mapMap(_json["tableDefinitions"], (item) => new
ExternalDataConfiguration.fromJson(item)); | 2985 tableDefinitions = commons.mapMap(_json["tableDefinitions"], (item) => new
ExternalDataConfiguration.fromJson(item)); |
| 2732 } | 2986 } |
| 2987 if (_json.containsKey("useLegacySql")) { |
| 2988 useLegacySql = _json["useLegacySql"]; |
| 2989 } |
| 2733 if (_json.containsKey("useQueryCache")) { | 2990 if (_json.containsKey("useQueryCache")) { |
| 2734 useQueryCache = _json["useQueryCache"]; | 2991 useQueryCache = _json["useQueryCache"]; |
| 2735 } | 2992 } |
| 2736 if (_json.containsKey("userDefinedFunctionResources")) { | 2993 if (_json.containsKey("userDefinedFunctionResources")) { |
| 2737 userDefinedFunctionResources = _json["userDefinedFunctionResources"].map((
value) => new UserDefinedFunctionResource.fromJson(value)).toList(); | 2994 userDefinedFunctionResources = _json["userDefinedFunctionResources"].map((
value) => new UserDefinedFunctionResource.fromJson(value)).toList(); |
| 2738 } | 2995 } |
| 2739 if (_json.containsKey("writeDisposition")) { | 2996 if (_json.containsKey("writeDisposition")) { |
| 2740 writeDisposition = _json["writeDisposition"]; | 2997 writeDisposition = _json["writeDisposition"]; |
| 2741 } | 2998 } |
| 2742 } | 2999 } |
| (...skipping 23 matching lines...) Expand all Loading... |
| 2766 } | 3023 } |
| 2767 if (priority != null) { | 3024 if (priority != null) { |
| 2768 _json["priority"] = priority; | 3025 _json["priority"] = priority; |
| 2769 } | 3026 } |
| 2770 if (query != null) { | 3027 if (query != null) { |
| 2771 _json["query"] = query; | 3028 _json["query"] = query; |
| 2772 } | 3029 } |
| 2773 if (tableDefinitions != null) { | 3030 if (tableDefinitions != null) { |
| 2774 _json["tableDefinitions"] = commons.mapMap(tableDefinitions, (item) => (it
em).toJson()); | 3031 _json["tableDefinitions"] = commons.mapMap(tableDefinitions, (item) => (it
em).toJson()); |
| 2775 } | 3032 } |
| 3033 if (useLegacySql != null) { |
| 3034 _json["useLegacySql"] = useLegacySql; |
| 3035 } |
| 2776 if (useQueryCache != null) { | 3036 if (useQueryCache != null) { |
| 2777 _json["useQueryCache"] = useQueryCache; | 3037 _json["useQueryCache"] = useQueryCache; |
| 2778 } | 3038 } |
| 2779 if (userDefinedFunctionResources != null) { | 3039 if (userDefinedFunctionResources != null) { |
| 2780 _json["userDefinedFunctionResources"] = userDefinedFunctionResources.map((
value) => (value).toJson()).toList(); | 3040 _json["userDefinedFunctionResources"] = userDefinedFunctionResources.map((
value) => (value).toJson()).toList(); |
| 2781 } | 3041 } |
| 2782 if (writeDisposition != null) { | 3042 if (writeDisposition != null) { |
| 2783 _json["writeDisposition"] = writeDisposition; | 3043 _json["writeDisposition"] = writeDisposition; |
| 2784 } | 3044 } |
| 2785 return _json; | 3045 return _json; |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3112 core.int billingTier; | 3372 core.int billingTier; |
| 3113 /** | 3373 /** |
| 3114 * [Output-only] Whether the query result was fetched from the query cache. | 3374 * [Output-only] Whether the query result was fetched from the query cache. |
| 3115 */ | 3375 */ |
| 3116 core.bool cacheHit; | 3376 core.bool cacheHit; |
| 3117 /** | 3377 /** |
| 3118 * [Output-only, Experimental] Describes execution plan for the query as a | 3378 * [Output-only, Experimental] Describes execution plan for the query as a |
| 3119 * list of stages. | 3379 * list of stages. |
| 3120 */ | 3380 */ |
| 3121 core.List<ExplainQueryStage> queryPlan; | 3381 core.List<ExplainQueryStage> queryPlan; |
| 3382 /** |
| 3383 * [Output-only, Experimental] Referenced tables for the job. Queries that |
| 3384 * reference more than 50 tables will not have a complete list. |
| 3385 */ |
| 3386 core.List<TableReference> referencedTables; |
| 3122 /** [Output-only] Total bytes billed for the job. */ | 3387 /** [Output-only] Total bytes billed for the job. */ |
| 3123 core.String totalBytesBilled; | 3388 core.String totalBytesBilled; |
| 3124 /** [Output-only] Total bytes processed for the job. */ | 3389 /** [Output-only] Total bytes processed for the job. */ |
| 3125 core.String totalBytesProcessed; | 3390 core.String totalBytesProcessed; |
| 3126 | 3391 |
| 3127 JobStatistics2(); | 3392 JobStatistics2(); |
| 3128 | 3393 |
| 3129 JobStatistics2.fromJson(core.Map _json) { | 3394 JobStatistics2.fromJson(core.Map _json) { |
| 3130 if (_json.containsKey("billingTier")) { | 3395 if (_json.containsKey("billingTier")) { |
| 3131 billingTier = _json["billingTier"]; | 3396 billingTier = _json["billingTier"]; |
| 3132 } | 3397 } |
| 3133 if (_json.containsKey("cacheHit")) { | 3398 if (_json.containsKey("cacheHit")) { |
| 3134 cacheHit = _json["cacheHit"]; | 3399 cacheHit = _json["cacheHit"]; |
| 3135 } | 3400 } |
| 3136 if (_json.containsKey("queryPlan")) { | 3401 if (_json.containsKey("queryPlan")) { |
| 3137 queryPlan = _json["queryPlan"].map((value) => new ExplainQueryStage.fromJs
on(value)).toList(); | 3402 queryPlan = _json["queryPlan"].map((value) => new ExplainQueryStage.fromJs
on(value)).toList(); |
| 3138 } | 3403 } |
| 3404 if (_json.containsKey("referencedTables")) { |
| 3405 referencedTables = _json["referencedTables"].map((value) => new TableRefer
ence.fromJson(value)).toList(); |
| 3406 } |
| 3139 if (_json.containsKey("totalBytesBilled")) { | 3407 if (_json.containsKey("totalBytesBilled")) { |
| 3140 totalBytesBilled = _json["totalBytesBilled"]; | 3408 totalBytesBilled = _json["totalBytesBilled"]; |
| 3141 } | 3409 } |
| 3142 if (_json.containsKey("totalBytesProcessed")) { | 3410 if (_json.containsKey("totalBytesProcessed")) { |
| 3143 totalBytesProcessed = _json["totalBytesProcessed"]; | 3411 totalBytesProcessed = _json["totalBytesProcessed"]; |
| 3144 } | 3412 } |
| 3145 } | 3413 } |
| 3146 | 3414 |
| 3147 core.Map toJson() { | 3415 core.Map toJson() { |
| 3148 var _json = new core.Map(); | 3416 var _json = new core.Map(); |
| 3149 if (billingTier != null) { | 3417 if (billingTier != null) { |
| 3150 _json["billingTier"] = billingTier; | 3418 _json["billingTier"] = billingTier; |
| 3151 } | 3419 } |
| 3152 if (cacheHit != null) { | 3420 if (cacheHit != null) { |
| 3153 _json["cacheHit"] = cacheHit; | 3421 _json["cacheHit"] = cacheHit; |
| 3154 } | 3422 } |
| 3155 if (queryPlan != null) { | 3423 if (queryPlan != null) { |
| 3156 _json["queryPlan"] = queryPlan.map((value) => (value).toJson()).toList(); | 3424 _json["queryPlan"] = queryPlan.map((value) => (value).toJson()).toList(); |
| 3157 } | 3425 } |
| 3426 if (referencedTables != null) { |
| 3427 _json["referencedTables"] = referencedTables.map((value) => (value).toJson
()).toList(); |
| 3428 } |
| 3158 if (totalBytesBilled != null) { | 3429 if (totalBytesBilled != null) { |
| 3159 _json["totalBytesBilled"] = totalBytesBilled; | 3430 _json["totalBytesBilled"] = totalBytesBilled; |
| 3160 } | 3431 } |
| 3161 if (totalBytesProcessed != null) { | 3432 if (totalBytesProcessed != null) { |
| 3162 _json["totalBytesProcessed"] = totalBytesProcessed; | 3433 _json["totalBytesProcessed"] = totalBytesProcessed; |
| 3163 } | 3434 } |
| 3164 return _json; | 3435 return _json; |
| 3165 } | 3436 } |
| 3166 } | 3437 } |
| 3167 | 3438 |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3488 * [Optional] How long to wait for the query to complete, in milliseconds, | 3759 * [Optional] How long to wait for the query to complete, in milliseconds, |
| 3489 * before the request times out and returns. Note that this is only a timeout | 3760 * before the request times out and returns. Note that this is only a timeout |
| 3490 * for the request, not the query. If the query takes longer to run than the | 3761 * for the request, not the query. If the query takes longer to run than the |
| 3491 * timeout value, the call returns without any results and with the | 3762 * timeout value, the call returns without any results and with the |
| 3492 * 'jobComplete' flag set to false. You can call GetQueryResults() to wait for | 3763 * 'jobComplete' flag set to false. You can call GetQueryResults() to wait for |
| 3493 * the query to complete and read the results. The default value is 10000 | 3764 * the query to complete and read the results. The default value is 10000 |
| 3494 * milliseconds (10 seconds). | 3765 * milliseconds (10 seconds). |
| 3495 */ | 3766 */ |
| 3496 core.int timeoutMs; | 3767 core.int timeoutMs; |
| 3497 /** | 3768 /** |
| 3769 * [Experimental] Specifies whether to use BigQuery's legacy SQL dialect for |
| 3770 * this query. The default value is true. If set to false, the query will use |
| 3771 * BigQuery's updated SQL dialect with improved standards compliance. When |
| 3772 * using BigQuery's updated SQL, the values of allowLargeResults and |
| 3773 * flattenResults are ignored. Queries with useLegacySql set to false will be |
| 3774 * run as if allowLargeResults is true and flattenResults is false. |
| 3775 */ |
| 3776 core.bool useLegacySql; |
| 3777 /** |
| 3498 * [Optional] Whether to look for the result in the query cache. The query | 3778 * [Optional] Whether to look for the result in the query cache. The query |
| 3499 * cache is a best-effort cache that will be flushed whenever tables in the | 3779 * cache is a best-effort cache that will be flushed whenever tables in the |
| 3500 * query are modified. The default value is true. | 3780 * query are modified. The default value is true. |
| 3501 */ | 3781 */ |
| 3502 core.bool useQueryCache; | 3782 core.bool useQueryCache; |
| 3503 | 3783 |
| 3504 QueryRequest(); | 3784 QueryRequest(); |
| 3505 | 3785 |
| 3506 QueryRequest.fromJson(core.Map _json) { | 3786 QueryRequest.fromJson(core.Map _json) { |
| 3507 if (_json.containsKey("defaultDataset")) { | 3787 if (_json.containsKey("defaultDataset")) { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 3518 } | 3798 } |
| 3519 if (_json.containsKey("preserveNulls")) { | 3799 if (_json.containsKey("preserveNulls")) { |
| 3520 preserveNulls = _json["preserveNulls"]; | 3800 preserveNulls = _json["preserveNulls"]; |
| 3521 } | 3801 } |
| 3522 if (_json.containsKey("query")) { | 3802 if (_json.containsKey("query")) { |
| 3523 query = _json["query"]; | 3803 query = _json["query"]; |
| 3524 } | 3804 } |
| 3525 if (_json.containsKey("timeoutMs")) { | 3805 if (_json.containsKey("timeoutMs")) { |
| 3526 timeoutMs = _json["timeoutMs"]; | 3806 timeoutMs = _json["timeoutMs"]; |
| 3527 } | 3807 } |
| 3808 if (_json.containsKey("useLegacySql")) { |
| 3809 useLegacySql = _json["useLegacySql"]; |
| 3810 } |
| 3528 if (_json.containsKey("useQueryCache")) { | 3811 if (_json.containsKey("useQueryCache")) { |
| 3529 useQueryCache = _json["useQueryCache"]; | 3812 useQueryCache = _json["useQueryCache"]; |
| 3530 } | 3813 } |
| 3531 } | 3814 } |
| 3532 | 3815 |
| 3533 core.Map toJson() { | 3816 core.Map toJson() { |
| 3534 var _json = new core.Map(); | 3817 var _json = new core.Map(); |
| 3535 if (defaultDataset != null) { | 3818 if (defaultDataset != null) { |
| 3536 _json["defaultDataset"] = (defaultDataset).toJson(); | 3819 _json["defaultDataset"] = (defaultDataset).toJson(); |
| 3537 } | 3820 } |
| 3538 if (dryRun != null) { | 3821 if (dryRun != null) { |
| 3539 _json["dryRun"] = dryRun; | 3822 _json["dryRun"] = dryRun; |
| 3540 } | 3823 } |
| 3541 if (kind != null) { | 3824 if (kind != null) { |
| 3542 _json["kind"] = kind; | 3825 _json["kind"] = kind; |
| 3543 } | 3826 } |
| 3544 if (maxResults != null) { | 3827 if (maxResults != null) { |
| 3545 _json["maxResults"] = maxResults; | 3828 _json["maxResults"] = maxResults; |
| 3546 } | 3829 } |
| 3547 if (preserveNulls != null) { | 3830 if (preserveNulls != null) { |
| 3548 _json["preserveNulls"] = preserveNulls; | 3831 _json["preserveNulls"] = preserveNulls; |
| 3549 } | 3832 } |
| 3550 if (query != null) { | 3833 if (query != null) { |
| 3551 _json["query"] = query; | 3834 _json["query"] = query; |
| 3552 } | 3835 } |
| 3553 if (timeoutMs != null) { | 3836 if (timeoutMs != null) { |
| 3554 _json["timeoutMs"] = timeoutMs; | 3837 _json["timeoutMs"] = timeoutMs; |
| 3555 } | 3838 } |
| 3839 if (useLegacySql != null) { |
| 3840 _json["useLegacySql"] = useLegacySql; |
| 3841 } |
| 3556 if (useQueryCache != null) { | 3842 if (useQueryCache != null) { |
| 3557 _json["useQueryCache"] = useQueryCache; | 3843 _json["useQueryCache"] = useQueryCache; |
| 3558 } | 3844 } |
| 3559 return _json; | 3845 return _json; |
| 3560 } | 3846 } |
| 3561 } | 3847 } |
| 3562 | 3848 |
| 3563 class QueryResponse { | 3849 class QueryResponse { |
| 3564 /** Whether the query result was fetched from the query cache. */ | 3850 /** Whether the query result was fetched from the query cache. */ |
| 3565 core.bool cacheHit; | 3851 core.bool cacheHit; |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3989 core.String kind; | 4275 core.String kind; |
| 3990 /** The rows to insert. */ | 4276 /** The rows to insert. */ |
| 3991 core.List<TableDataInsertAllRequestRows> rows; | 4277 core.List<TableDataInsertAllRequestRows> rows; |
| 3992 /** | 4278 /** |
| 3993 * [Optional] Insert all valid rows of a request, even if invalid rows exist. | 4279 * [Optional] Insert all valid rows of a request, even if invalid rows exist. |
| 3994 * The default value is false, which causes the entire request to fail if any | 4280 * The default value is false, which causes the entire request to fail if any |
| 3995 * invalid rows exist. | 4281 * invalid rows exist. |
| 3996 */ | 4282 */ |
| 3997 core.bool skipInvalidRows; | 4283 core.bool skipInvalidRows; |
| 3998 /** | 4284 /** |
| 3999 * [Optional] If specified, treats the destination table as a base template, | 4285 * [Experimental] If specified, treats the destination table as a base |
| 4000 * and inserts the rows into an instance table named | 4286 * template, and inserts the rows into an instance table named |
| 4001 * "{destination}{templateSuffix}". BigQuery will manage creation of the | 4287 * "{destination}{templateSuffix}". BigQuery will manage creation of the |
| 4002 * instance table, using the schema of the base template table. See | 4288 * instance table, using the schema of the base template table. See |
| 4003 * https://cloud.google.com/bigquery/streaming-data-into-bigquery#template-tab
les | 4289 * https://cloud.google.com/bigquery/streaming-data-into-bigquery#template-tab
les |
| 4004 * for considerations when working with templates tables. | 4290 * for considerations when working with templates tables. |
| 4005 */ | 4291 */ |
| 4006 core.String templateSuffix; | 4292 core.String templateSuffix; |
| 4007 | 4293 |
| 4008 TableDataInsertAllRequest(); | 4294 TableDataInsertAllRequest(); |
| 4009 | 4295 |
| 4010 TableDataInsertAllRequest.fromJson(core.Map _json) { | 4296 TableDataInsertAllRequest.fromJson(core.Map _json) { |
| (...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4481 var _json = new core.Map(); | 4767 var _json = new core.Map(); |
| 4482 if (query != null) { | 4768 if (query != null) { |
| 4483 _json["query"] = query; | 4769 _json["query"] = query; |
| 4484 } | 4770 } |
| 4485 if (userDefinedFunctionResources != null) { | 4771 if (userDefinedFunctionResources != null) { |
| 4486 _json["userDefinedFunctionResources"] = userDefinedFunctionResources.map((
value) => (value).toJson()).toList(); | 4772 _json["userDefinedFunctionResources"] = userDefinedFunctionResources.map((
value) => (value).toJson()).toList(); |
| 4487 } | 4773 } |
| 4488 return _json; | 4774 return _json; |
| 4489 } | 4775 } |
| 4490 } | 4776 } |
| OLD | NEW |