on develop help sign in
Regenerating gogol-bigquery from latest service definition
7cfc209Brendan Hay
gen/model/bigquery/v2/bigquery-api.json+183−10
@@ -1,11 +1,11 @@
1{
1{
2 "kind": "discovery#restDescription",
2 "kind": "discovery#restDescription",
3− "etag": "\"jQLIOHBVnDZie4rQHGH1WJF-INE/xJN8TIpPcg1NGIZr6unBuM4TVZg\"",
3+ "etag": "\"C5oy1hgQsABtYOYIOXWcR3BgYqU/v5KMn4eNX1u6f2QZ4MK3wTA9qok\"",
4 "discoveryVersion": "v1",
4 "discoveryVersion": "v1",
5 "id": "bigquery:v2",
5 "id": "bigquery:v2",
6 "name": "bigquery",
6 "name": "bigquery",
7 "version": "v2",
7 "version": "v2",
8− "revision": "20160511",
8+ "revision": "20161016",
9 "title": "BigQuery API",
9 "title": "BigQuery API",
10 "description": "A data platform for customers to create, manage, share and query data.",
10 "description": "A data platform for customers to create, manage, share and query data.",
11 "ownerDomain": "google.com",
11 "ownerDomain": "google.com",
@@ -27,11 +27,9 @@
27 "description": "Data format for the response.",
27 "description": "Data format for the response.",
28 "default": "json",
28 "default": "json",
29 "enum": [
29 "enum": [
30− "csv",
31 "json"
30 "json"
32 ],
31 ],
33 "enumDescriptions": [
32 "enumDescriptions": [
34− "Responses with Content-Type of text/csv",
35 "Responses with Content-Type of application/json"
33 "Responses with Content-Type of application/json"
36 ],
34 ],
37 "location": "query"
35 "location": "query"
@@ -122,7 +120,7 @@
122 },
120 },
123 "type": {
121 "type": {
124 "type": "string",
122 "type": "string",
125− "description": "[Optional] The type to convert the value in cells of this column. The values are expected to be encoded using HBase Bytes.toBytes function when using the BINARY encoding value. Following BigQuery types are allowed (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Defaut type is BYTES. 'type' can also be set at the column family level. However, the setting at this level takes precedence if 'type' is set at both levels."
123+ "description": "[Optional] The type to convert the value in cells of this column. The values are expected to be encoded using HBase Bytes.toBytes function when using the BINARY encoding value. Following BigQuery types are allowed (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Default type is BYTES. 'type' can also be set at the column family level. However, the setting at this level takes precedence if 'type' is set at both levels."
126 }
124 }
127 }
125 }
128 },
126 },
@@ -151,7 +149,7 @@
151 },
149 },
152 "type": {
150 "type": {
153 "type": "string",
151 "type": "string",
154− "description": "[Optional] The type to convert the value in cells of this column family. The values are expected to be encoded using HBase Bytes.toBytes function when using the BINARY encoding value. Following BigQuery types are allowed (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Defaut type is BYTES. This can be overridden for a specific column by listing that column in 'columns' and specifying a type for it."
152+ "description": "[Optional] The type to convert the value in cells of this column family. The values are expected to be encoded using HBase Bytes.toBytes function when using the BINARY encoding value. Following BigQuery types are allowed (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Default type is BYTES. This can be overridden for a specific column by listing that column in 'columns' and specifying a type for it."
155 }
153 }
156 }
154 }
157 },
155 },
@@ -169,6 +167,10 @@
169 "ignoreUnspecifiedColumnFamilies": {
167 "ignoreUnspecifiedColumnFamilies": {
170 "type": "boolean",
168 "type": "boolean",
171 "description": "[Optional] If field is true, then the column families that are not specified in columnFamilies list are not exposed in the table schema. Otherwise, they are read with BYTES type values. The default value is false."
169 "description": "[Optional] If field is true, then the column families that are not specified in columnFamilies list are not exposed in the table schema. Otherwise, they are read with BYTES type values. The default value is false."
170+ },
171+ "readRowkeyAsString": {
172+ "type": "boolean",
173+ "description": "[Optional] If field is true, then the rowkey column families will be read and converted to string. Otherwise they are read with BYTES type values and users need to manually cast them with CAST if necessary. The default value is false."
172 }
174 }
173 }
175 }
174 },
176 },
@@ -277,6 +279,13 @@
277 "description": "[Output-only] The resource type.",
279 "description": "[Output-only] The resource type.",
278 "default": "bigquery#dataset"
280 "default": "bigquery#dataset"
279 },
281 },
282+ "labels": {
283+ "type": "object",
284+ "description": "[Experimental] The labels associated with this dataset. You can use these to organize and group your datasets. You can set this property when inserting or updating a dataset. See Labeling Datasets for more information.",
285+ "additionalProperties": {
286+ "type": "string"
287+ }
288+ },
280 "lastModifiedTime": {
289 "lastModifiedTime": {
281 "type": "string",
290 "type": "string",
282 "description": "[Output-only] The date when this dataset or any of its tables was last modified, in milliseconds since the epoch.",
291 "description": "[Output-only] The date when this dataset or any of its tables was last modified, in milliseconds since the epoch.",
@@ -318,6 +327,13 @@
318 "type": "string",
327 "type": "string",
319 "description": "The resource type. This property always returns the value \"bigquery#dataset\".",
328 "description": "The resource type. This property always returns the value \"bigquery#dataset\".",
320 "default": "bigquery#dataset"
329 "default": "bigquery#dataset"
330+ },
331+ "labels": {
332+ "type": "object",
333+ "description": "[Experimental] The labels associated with this dataset. You can use these to organize and group your datasets.",
334+ "additionalProperties": {
335+ "type": "string"
336+ }
321 }
337 }
322 }
338 }
323 }
339 }
@@ -554,6 +570,11 @@
554 "description": "The resource type of the response.",
570 "description": "The resource type of the response.",
555 "default": "bigquery#getQueryResultsResponse"
571 "default": "bigquery#getQueryResultsResponse"
556 },
572 },
573+ "numDmlAffectedRows": {
574+ "type": "string",
575+ "description": "[Output-only, Experimental] The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE.",
576+ "format": "int64"
577+ },
557 "pageToken": {
578 "pageToken": {
558 "type": "string",
579 "type": "string",
559 "description": "A token used for paging results."
580 "description": "A token used for paging results."
@@ -666,6 +687,13 @@
666 "$ref": "JobConfigurationExtract",
687 "$ref": "JobConfigurationExtract",
667 "description": "[Pick one] Configures an extract job."
688 "description": "[Pick one] Configures an extract job."
668 },
689 },
690+ "labels": {
691+ "type": "object",
692+ "description": "[Experimental] The labels associated with this job. You can use these to organize and group your jobs. Label keys and values can be no longer than 63 characters, can only contain letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter and must be unique within a dataset. Both keys and values are additionally constrained to be \u003c= 128 bytes in size.",
693+ "additionalProperties": {
694+ "type": "string"
695+ }
696+ },
669 "load": {
697 "load": {
670 "$ref": "JobConfigurationLoad",
698 "$ref": "JobConfigurationLoad",
671 "description": "[Pick one] Configures a load job."
699 "description": "[Pick one] Configures a load job."
@@ -780,6 +808,13 @@
780 "type": "string",
808 "type": "string",
781 "description": "[Deprecated] The format of the schemaInline property."
809 "description": "[Deprecated] The format of the schemaInline property."
782 },
810 },
811+ "schemaUpdateOptions": {
812+ "type": "array",
813+ "description": "[Experimental] Allows the schema of the desitination table to be updated as a side effect of the load job. Schema update options are supported in two cases: when writeDisposition is WRITE_APPEND; when writeDisposition is WRITE_TRUNCATE and the destination table is a partition of a table, specified by partition decorators. For normal tables, WRITE_TRUNCATE will always overwrite the schema. One or more of the following values are specified: ALLOW_FIELD_ADDITION: allow adding a nullable field to the schema. ALLOW_FIELD_RELAXATION: allow relaxing a required field in the original schema to nullable.",
814+ "items": {
815+ "type": "string"
816+ }
817+ },
783 "skipLeadingRows": {
818 "skipLeadingRows": {
784 "type": "integer",
819 "type": "integer",
785 "description": "[Optional] The number of rows at the top of a CSV file that BigQuery will skip when loading the data. The default value is 0. This property is useful if you have header rows in the file that should be skipped.",
820 "description": "[Optional] The number of rows at the top of a CSV file that BigQuery will skip when loading the data. The default value is 0. This property is useful if you have header rows in the file that should be skipped.",
@@ -833,6 +868,15 @@
833 "default": "1",
868 "default": "1",
834 "format": "int32"
869 "format": "int32"
835 },
870 },
871+ "maximumBytesBilled": {
872+ "type": "string",
873+ "description": "[Optional] Limits the bytes billed for this job. Queries that will have bytes billed beyond this limit will fail (without incurring a charge). If unspecified, this will be set to your project default.",
874+ "format": "int64"
875+ },
876+ "parameterMode": {
877+ "type": "string",
878+ "description": "[Experimental] Standard SQL only. Whether to use positional (?) or named (@myparam) query parameters in this query."
879+ },
836 "preserveNulls": {
880 "preserveNulls": {
837 "type": "boolean",
881 "type": "boolean",
838 "description": "[Deprecated] This property is deprecated."
882 "description": "[Deprecated] This property is deprecated."
@@ -845,6 +889,20 @@
845 "type": "string",
889 "type": "string",
846 "description": "[Required] BigQuery SQL query to execute."
890 "description": "[Required] BigQuery SQL query to execute."
847 },
891 },
892+ "queryParameters": {
893+ "type": "array",
894+ "description": "Query parameters for standard SQL queries.",
895+ "items": {
896+ "$ref": "QueryParameter"
897+ }
898+ },
899+ "schemaUpdateOptions": {
900+ "type": "array",
901+ "description": "[Experimental] Allows the schema of the destination table to be updated as a side effect of the query job. Schema update options are supported in two cases: when writeDisposition is WRITE_APPEND; when writeDisposition is WRITE_TRUNCATE and the destination table is a partition of a table, specified by partition decorators. For normal tables, WRITE_TRUNCATE will always overwrite the schema. One or more of the following values are specified: ALLOW_FIELD_ADDITION: allow adding a nullable field to the schema. ALLOW_FIELD_RELAXATION: allow relaxing a required field in the original schema to nullable.",
902+ "items": {
903+ "type": "string"
904+ }
905+ },
848 "tableDefinitions": {
906 "tableDefinitions": {
849 "type": "object",
907 "type": "object",
850 "description": "[Optional] If querying an external data source outside of BigQuery, describes the data format, location and other properties of the data source. By defining these properties, the data source can then be queried as if it were a standard BigQuery table.",
908 "description": "[Optional] If querying an external data source outside of BigQuery, describes the data format, location and other properties of the data source. By defining these properties, the data source can then be queried as if it were a standard BigQuery table.",
@@ -1043,9 +1101,14 @@
1043 "type": "boolean",
1101 "type": "boolean",
1044 "description": "[Output-only] Whether the query result was fetched from the query cache."
1102 "description": "[Output-only] Whether the query result was fetched from the query cache."
1045 },
1103 },
1104+ "numDmlAffectedRows": {
1105+ "type": "string",
1106+ "description": "[Output-only, Experimental] The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE.",
1107+ "format": "int64"
1108+ },
1046 "queryPlan": {
1109 "queryPlan": {
1047 "type": "array",
1110 "type": "array",
1048− "description": "[Output-only, Experimental] Describes execution plan for the query as a list of stages.",
1111+ "description": "[Output-only, Experimental] Describes execution plan for the query.",
1049 "items": {
1112 "items": {
1050 "$ref": "ExplainQueryStage"
1113 "$ref": "ExplainQueryStage"
1051 }
1114 }
@@ -1070,6 +1133,13 @@
1070 "type": "string",
1133 "type": "string",
1071 "description": "[Output-only] Total bytes processed for the job.",
1134 "description": "[Output-only] Total bytes processed for the job.",
1072 "format": "int64"
1135 "format": "int64"
1136+ },
1137+ "undeclaredQueryParameters": {
1138+ "type": "array",
1139+ "description": "[Output-only, Experimental] Standard SQL only: list of undeclared query parameters detected during a dry run validation.",
1140+ "items": {
1141+ "$ref": "QueryParameter"
1142+ }
1073 }
1143 }
1074 }
1144 }
1075 },
1145 },
@@ -1211,6 +1281,83 @@
1211 }
1281 }
1212 }
1282 }
1213 },
1283 },
1284+ "QueryParameter": {
1285+ "id": "QueryParameter",
1286+ "type": "object",
1287+ "properties": {
1288+ "name": {
1289+ "type": "string",
1290+ "description": "[Optional] If unset, this is a positional parameter. Otherwise, should be unique within a query."
1291+ },
1292+ "parameterType": {
1293+ "$ref": "QueryParameterType",
1294+ "description": "[Required] The type of this parameter."
1295+ },
1296+ "parameterValue": {
1297+ "$ref": "QueryParameterValue",
1298+ "description": "[Required] The value of this parameter."
1299+ }
1300+ }
1301+ },
1302+ "QueryParameterType": {
1303+ "id": "QueryParameterType",
1304+ "type": "object",
1305+ "properties": {
1306+ "arrayType": {
1307+ "$ref": "QueryParameterType",
1308+ "description": "[Optional] The type of the array's elements, if this is an array."
1309+ },
1310+ "structTypes": {
1311+ "type": "array",
1312+ "description": "[Optional] The types of the fields of this struct, in order, if this is a struct.",
1313+ "items": {
1314+ "type": "object",
1315+ "properties": {
1316+ "description": {
1317+ "type": "string",
1318+ "description": "[Optional] Human-oriented description of the field."
1319+ },
1320+ "name": {
1321+ "type": "string",
1322+ "description": "[Optional] The name of this field."
1323+ },
1324+ "type": {
1325+ "$ref": "QueryParameterType",
1326+ "description": "[Required] The type of this field."
1327+ }
1328+ }
1329+ }
1330+ },
1331+ "type": {
1332+ "type": "string",
1333+ "description": "[Required] The top level type of this field."
1334+ }
1335+ }
1336+ },
1337+ "QueryParameterValue": {
1338+ "id": "QueryParameterValue",
1339+ "type": "object",
1340+ "properties": {
1341+ "arrayValues": {
1342+ "type": "array",
1343+ "description": "[Optional] The array values, if this is an array type.",
1344+ "items": {
1345+ "$ref": "QueryParameterValue"
1346+ }
1347+ },
1348+ "structValues": {
1349+ "type": "object",
1350+ "description": "[Optional] The struct field values, in order of the struct type's declaration.",
1351+ "additionalProperties": {
1352+ "$ref": "QueryParameterValue"
1353+ }
1354+ },
1355+ "value": {
1356+ "type": "string",
1357+ "description": "[Optional] The value of this value, if a simple scalar type."
1358+ }
1359+ }
1360+ },
1214 "QueryRequest": {
1361 "QueryRequest": {
1215 "id": "QueryRequest",
1362 "id": "QueryRequest",
1216 "type": "object",
1363 "type": "object",
@@ -1233,6 +1380,10 @@
1233 "description": "[Optional] The maximum number of rows of data to return per page of results. Setting this flag to a small value such as 1000 and then paging through results might improve reliability when the query result set is large. In addition to this limit, responses are also limited to 10 MB. By default, there is no maximum row count, and only the byte limit applies.",
1380 "description": "[Optional] The maximum number of rows of data to return per page of results. Setting this flag to a small value such as 1000 and then paging through results might improve reliability when the query result set is large. In addition to this limit, responses are also limited to 10 MB. By default, there is no maximum row count, and only the byte limit applies.",
1234 "format": "uint32"
1381 "format": "uint32"
1235 },
1382 },
1383+ "parameterMode": {
1384+ "type": "string",
1385+ "description": "[Experimental] Standard SQL only. Whether to use positional (?) or named (@myparam) query parameters in this query."
1386+ },
1236 "preserveNulls": {
1387 "preserveNulls": {
1237 "type": "boolean",
1388 "type": "boolean",
1238 "description": "[Deprecated] This property is deprecated."
1389 "description": "[Deprecated] This property is deprecated."
@@ -1246,6 +1397,13 @@
1246 ]
1397 ]
1247 }
1398 }
1248 },
1399 },
1400+ "queryParameters": {
1401+ "type": "array",
1402+ "description": "[Experimental] Query parameters for Standard SQL queries.",
1403+ "items": {
1404+ "$ref": "QueryParameter"
1405+ }
1406+ },
1249 "timeoutMs": {
1407 "timeoutMs": {
1250 "type": "integer",
1408 "type": "integer",
1251 "description": "[Optional] How long to wait for the query to complete, in milliseconds, before the request times out and returns. Note that this is only a timeout for the request, not the query. If the query takes longer to run than the timeout value, the call returns without any results and with the 'jobComplete' flag set to false. You can call GetQueryResults() to wait for the query to complete and read the results. The default value is 10000 milliseconds (10 seconds).",
1409 "description": "[Optional] How long to wait for the query to complete, in milliseconds, before the request times out and returns. Note that this is only a timeout for the request, not the query. If the query takes longer to run than the timeout value, the call returns without any results and with the 'jobComplete' flag set to false. You can call GetQueryResults() to wait for the query to complete and read the results. The default value is 10000 milliseconds (10 seconds).",
@@ -1253,7 +1411,8 @@
1253 },
1411 },
1254 "useLegacySql": {
1412 "useLegacySql": {
1255 "type": "boolean",
1413 "type": "boolean",
1256− "description": "[Experimental] Specifies whether to use BigQuery's legacy SQL dialect for this query. The default value is true. If set to false, the query will use BigQuery's standard SQL: https://cloud.google.com/bigquery/sql-reference/ When useLegacySql is set to false, the values of allowLargeResults and flattenResults are ignored; query will be run as if allowLargeResults is true and flattenResults is false."
1414+ "description": "[Experimental] Specifies whether to use BigQuery's legacy SQL dialect for this query. The default value is true. If set to false, the query will use BigQuery's standard SQL: https://cloud.google.com/bigquery/sql-reference/ When useLegacySql is set to false, the values of allowLargeResults and flattenResults are ignored; query will be run as if allowLargeResults is true and flattenResults is false.",
1415+ "default": "true"
1257 },
1416 },
1258 "useQueryCache": {
1417 "useQueryCache": {
1259 "type": "boolean",
1418 "type": "boolean",
@@ -1290,6 +1449,11 @@
1290 "description": "The resource type.",
1449 "description": "The resource type.",
1291 "default": "bigquery#queryResponse"
1450 "default": "bigquery#queryResponse"
1292 },
1451 },
1452+ "numDmlAffectedRows": {
1453+ "type": "string",
1454+ "description": "[Output-only, Experimental] The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE.",
1455+ "format": "int64"
1456+ },
1293 "pageToken": {
1457 "pageToken": {
1294 "type": "string",
1458 "type": "string",
1295 "description": "A token used for paging results."
1459 "description": "A token used for paging results."
@@ -1568,7 +1732,7 @@
1568 },
1732 },
1569 "type": {
1733 "type": {
1570 "type": "string",
1734 "type": "string",
1571− "description": "[Required] The field data type. Possible values include STRING, BYTES, INTEGER, FLOAT, BOOLEAN, TIMESTAMP or RECORD (where RECORD indicates that the field contains a nested schema)."
1735+ "description": "[Required] The field data type. Possible values include STRING, BYTES, INTEGER, FLOAT, BOOLEAN, TIMESTAMP, DATE, TIME, DATETIME, or RECORD (where RECORD indicates that the field contains a nested schema)."
1572 }
1736 }
1573 }
1737 }
1574 },
1738 },
@@ -1722,6 +1886,10 @@
1722 "type": "string",
1886 "type": "string",
1723 "description": "[Required] A query that BigQuery executes when the view is referenced."
1887 "description": "[Required] A query that BigQuery executes when the view is referenced."
1724 },
1888 },
1889+ "useLegacySql": {
1890+ "type": "boolean",
1891+ "description": "[Experimental] Specifies whether to use BigQuery's legacy SQL for this view. The default value is true. If set to false, the view will use BigQuery's standard SQL: https://cloud.google.com/bigquery/sql-reference/ Queries and views that reference this view must use the same flag value."
1892+ },
1725 "userDefinedFunctionResources": {
1893 "userDefinedFunctionResources": {
1726 "type": "array",
1894 "type": "array",
1727 "description": "[Experimental] Describes user-defined function resources used in the query.",
1895 "description": "[Experimental] Describes user-defined function resources used in the query.",
@@ -1838,6 +2006,11 @@
1838 "description": "Whether to list all datasets, including hidden ones",
2006 "description": "Whether to list all datasets, including hidden ones",
1839 "location": "query"
2007 "location": "query"
1840 },
2008 },
2009+ "filter": {
2010+ "type": "string",
2011+ "description": "An expression for filtering the results of the request by label. The syntax is \"labels.\u003cname\u003e[:\u003cvalue\u003e]\". Multiple filters can be ANDed together by connecting with a space. Example: \"labels.department:receiving labels.active\". See Filtering datasets using labels for details.",
2012+ "location": "query"
2013+ },
1841 "maxResults": {
2014 "maxResults": {
1842 "type": "integer",
2015 "type": "integer",
1843 "description": "The maximum number of results to return",
2016 "description": "The maximum number of results to return",
@@ -1942,7 +2115,7 @@
1942 "methods": {
2115 "methods": {
1943 "cancel": {
2116 "cancel": {
1944 "id": "bigquery.jobs.cancel",
2117 "id": "bigquery.jobs.cancel",
1945− "path": "project/{projectId}/jobs/{jobId}/cancel",
2118+ "path": "projects/{projectId}/jobs/{jobId}/cancel",
1946 "httpMethod": "POST",
2119 "httpMethod": "POST",
1947 "description": "Requests that a job be cancelled. This call will return immediately, and the client will need to poll for the job status to see if the cancel completed successfully. Cancelled jobs may still incur costs.",
2120 "description": "Requests that a job be cancelled. This call will return immediately, and the client will need to poll for the job status to see if the cancel completed successfully. Cancelled jobs may still incur costs.",
1948 "parameters": {
2121 "parameters": {
gogol-bigquery/gen/Network/Google/BigQuery.hs+64
@@ -122,6 +122,7 @@ module Network.Google.BigQuery
122 , dsldsiKind
122 , dsldsiKind
123 , dsldsiDataSetReference
123 , dsldsiDataSetReference
124 , dsldsiId
124 , dsldsiId
125+ , dsldsiLabels
125
126
126 -- ** TableDataList
127 -- ** TableDataList
127 , TableDataList
128 , TableDataList
@@ -170,6 +171,13 @@ module Network.Google.BigQuery
170 , eqsSubsteps
171 , eqsSubsteps
171 , eqsKind
172 , eqsKind
172
173
174+ -- ** QueryParameterTypeStructTypesItem
175+ , QueryParameterTypeStructTypesItem
176+ , queryParameterTypeStructTypesItem
177+ , qptstiName
178+ , qptstiType
179+ , qptstiDescription
180+
173 -- ** BigtableColumnFamily
181 -- ** BigtableColumnFamily
174 , BigtableColumnFamily
182 , BigtableColumnFamily
175 , bigtableColumnFamily
183 , bigtableColumnFamily
@@ -190,6 +198,11 @@ module Network.Google.BigQuery
190 , jsQuery
198 , jsQuery
191 , jsExtract
199 , jsExtract
192
200
201+ -- ** JobConfigurationLabels
202+ , JobConfigurationLabels
203+ , jobConfigurationLabels
204+ , jclAddtional
205+
193 -- ** DataSet
206 -- ** DataSet
194 , DataSet
207 , DataSet
195 , dataSet
208 , dataSet
@@ -203,12 +216,14 @@ module Network.Google.BigQuery
203 , dsDataSetReference
216 , dsDataSetReference
204 , dsSelfLink
217 , dsSelfLink
205 , dsId
218 , dsId
219+ , dsLabels
206 , dsDefaultTableExpirationMs
220 , dsDefaultTableExpirationMs
207 , dsDescription
221 , dsDescription
208
222
209 -- ** BigtableOptions
223 -- ** BigtableOptions
210 , BigtableOptions
224 , BigtableOptions
211 , bigtableOptions
225 , bigtableOptions
226+ , boReadRowkeyAsString
212 , boIgnoreUnspecifiedColumnFamilies
227 , boIgnoreUnspecifiedColumnFamilies
213 , boColumnFamilies
228 , boColumnFamilies
214
229
@@ -252,6 +267,7 @@ module Network.Google.BigQuery
252 , gqrrTotalBytesProcessed
267 , gqrrTotalBytesProcessed
253 , gqrrRows
268 , gqrrRows
254 , gqrrPageToken
269 , gqrrPageToken
270+ , gqrrNumDmlAffectedRows
255 , gqrrTotalRows
271 , gqrrTotalRows
256 , gqrrErrors
272 , gqrrErrors
257 , gqrrJobComplete
273 , gqrrJobComplete
@@ -271,7 +287,9 @@ module Network.Google.BigQuery
271 , qrUseQueryCache
287 , qrUseQueryCache
272 , qrPreserveNulls
288 , qrPreserveNulls
273 , qrKind
289 , qrKind
290+ , qrQueryParameters
274 , qrQuery
291 , qrQuery
292+ , qrParameterMode
275 , qrTimeoutMs
293 , qrTimeoutMs
276 , qrUseLegacySQL
294 , qrUseLegacySQL
277 , qrDryRun
295 , qrDryRun
@@ -281,6 +299,13 @@ module Network.Google.BigQuery
281 -- ** JobsListProjection
299 -- ** JobsListProjection
282 , JobsListProjection (..)
300 , JobsListProjection (..)
283
301
302+ -- ** QueryParameter
303+ , QueryParameter
304+ , queryParameter
305+ , qpParameterValue
306+ , qpParameterType
307+ , qpName
308+
284 -- ** JobStatistics4
309 -- ** JobStatistics4
285 , JobStatistics4
310 , JobStatistics4
286 , jobStatistics4
311 , jobStatistics4
@@ -318,6 +343,7 @@ module Network.Google.BigQuery
318 , jclAllowJaggedRows
343 , jclAllowJaggedRows
319 , jclSchemaInline
344 , jclSchemaInline
320 , jclIgnoreUnknownValues
345 , jclIgnoreUnknownValues
346+ , jclSchemaUpdateOptions
321 , jclCreateDisPosition
347 , jclCreateDisPosition
322 , jclSchemaInlineFormat
348 , jclSchemaInlineFormat
323 , jclAllowQuotedNewlines
349 , jclAllowQuotedNewlines
@@ -398,6 +424,16 @@ module Network.Google.BigQuery
398 , tpExpirationMs
424 , tpExpirationMs
399 , tpType
425 , tpType
400
426
427+ -- ** QueryParameterValueStructValues
428+ , QueryParameterValueStructValues
429+ , queryParameterValueStructValues
430+ , qpvsvAddtional
431+
432+ -- ** DataSetLabels
433+ , DataSetLabels
434+ , dataSetLabels
435+ , dslAddtional
436+
401 -- ** JobConfiguration
437 -- ** JobConfiguration
402 , JobConfiguration
438 , JobConfiguration
403 , jobConfiguration
439 , jobConfiguration
@@ -405,6 +441,7 @@ module Network.Google.BigQuery
405 , jcLoad
441 , jcLoad
406 , jcQuery
442 , jcQuery
407 , jcExtract
443 , jcExtract
444+ , jcLabels
408 , jcDryRun
445 , jcDryRun
409
446
410 -- ** Job
447 -- ** Job
@@ -457,12 +494,16 @@ module Network.Google.BigQuery
457 , jcqUseQueryCache
494 , jcqUseQueryCache
458 , jcqPreserveNulls
495 , jcqPreserveNulls
459 , jcqTableDefinitions
496 , jcqTableDefinitions
497+ , jcqQueryParameters
498+ , jcqSchemaUpdateOptions
499+ , jcqMaximumBytesBilled
460 , jcqCreateDisPosition
500 , jcqCreateDisPosition
461 , jcqUserDefinedFunctionResources
501 , jcqUserDefinedFunctionResources
462 , jcqAllowLargeResults
502 , jcqAllowLargeResults
463 , jcqMaximumBillingTier
503 , jcqMaximumBillingTier
464 , jcqQuery
504 , jcqQuery
465 , jcqFlattenResults
505 , jcqFlattenResults
506+ , jcqParameterMode
466 , jcqUseLegacySQL
507 , jcqUseLegacySQL
467 , jcqDefaultDataSet
508 , jcqDefaultDataSet
468
509
@@ -495,11 +536,19 @@ module Network.Google.BigQuery
495 , tableCell
536 , tableCell
496 , tcV
537 , tcV
497
538
539+ -- ** QueryParameterValue
540+ , QueryParameterValue
541+ , queryParameterValue
542+ , qpvStructValues
543+ , qpvValue
544+ , qpvArrayValues
545+
498 -- ** ViewDefinition
546 -- ** ViewDefinition
499 , ViewDefinition
547 , ViewDefinition
500 , viewDefinition
548 , viewDefinition
501 , vdUserDefinedFunctionResources
549 , vdUserDefinedFunctionResources
502 , vdQuery
550 , vdQuery
551+ , vdUseLegacySQL
503
552
504 -- ** UserDefinedFunctionResource
553 -- ** UserDefinedFunctionResource
505 , UserDefinedFunctionResource
554 , UserDefinedFunctionResource
@@ -513,7 +562,9 @@ module Network.Google.BigQuery
513 , jSchema
562 , jSchema
514 , jTotalBytesProcessed
563 , jTotalBytesProcessed
515 , jBillingTier
564 , jBillingTier
565+ , jUndeclaredQueryParameters
516 , jReferencedTables
566 , jReferencedTables
567+ , jNumDmlAffectedRows
517 , jQueryPlan
568 , jQueryPlan
518 , jCacheHit
569 , jCacheHit
519 , jTotalBytesBilled
570 , jTotalBytesBilled
@@ -541,6 +592,13 @@ module Network.Google.BigQuery
541 , tKind
592 , tKind
542 , tInsertErrors
593 , tInsertErrors
543
594
595+ -- ** QueryParameterType
596+ , QueryParameterType
597+ , queryParameterType
598+ , qptStructTypes
599+ , qptType
600+ , qptArrayType
601+
544 -- ** Table
602 -- ** Table
545 , Table
603 , Table
546 , table
604 , table
@@ -600,10 +658,16 @@ module Network.Google.BigQuery
600 , qTotalBytesProcessed
658 , qTotalBytesProcessed
601 , qRows
659 , qRows
602 , qPageToken
660 , qPageToken
661+ , qNumDmlAffectedRows
603 , qTotalRows
662 , qTotalRows
604 , qErrors
663 , qErrors
605 , qJobComplete
664 , qJobComplete
606 , qCacheHit
665 , qCacheHit
666+
667+ -- ** DataSetListDataSetsItemLabels
668+ , DataSetListDataSetsItemLabels
669+ , dataSetListDataSetsItemLabels
670+ , dsldsilAddtional
607 ) where
671 ) where
608
672
609import Network.Google.BigQuery.Types
673import Network.Google.BigQuery.Types
gogol-bigquery/gen/Network/Google/BigQuery/Types.hs+64
@@ -50,6 +50,7 @@ module Network.Google.BigQuery.Types
50 , dsldsiKind
50 , dsldsiKind
51 , dsldsiDataSetReference
51 , dsldsiDataSetReference
52 , dsldsiId
52 , dsldsiId
53+ , dsldsiLabels
53
54
54 -- * TableDataList
55 -- * TableDataList
55 , TableDataList
56 , TableDataList
@@ -98,6 +99,13 @@ module Network.Google.BigQuery.Types
98 , eqsSubsteps
99 , eqsSubsteps
99 , eqsKind
100 , eqsKind
100
101
102+ -- * QueryParameterTypeStructTypesItem
103+ , QueryParameterTypeStructTypesItem
104+ , queryParameterTypeStructTypesItem
105+ , qptstiName
106+ , qptstiType
107+ , qptstiDescription
108+
101 -- * BigtableColumnFamily
109 -- * BigtableColumnFamily
102 , BigtableColumnFamily
110 , BigtableColumnFamily
103 , bigtableColumnFamily
111 , bigtableColumnFamily
@@ -118,6 +126,11 @@ module Network.Google.BigQuery.Types
118 , jsQuery
126 , jsQuery
119 , jsExtract
127 , jsExtract
120
128
129+ -- * JobConfigurationLabels
130+ , JobConfigurationLabels
131+ , jobConfigurationLabels
132+ , jclAddtional
133+
121 -- * DataSet
134 -- * DataSet
122 , DataSet
135 , DataSet
123 , dataSet
136 , dataSet
@@ -131,12 +144,14 @@ module Network.Google.BigQuery.Types
131 , dsDataSetReference
144 , dsDataSetReference
132 , dsSelfLink
145 , dsSelfLink
133 , dsId
146 , dsId
147+ , dsLabels
134 , dsDefaultTableExpirationMs
148 , dsDefaultTableExpirationMs
135 , dsDescription
149 , dsDescription
136
150
137 -- * BigtableOptions
151 -- * BigtableOptions
138 , BigtableOptions
152 , BigtableOptions
139 , bigtableOptions
153 , bigtableOptions
154+ , boReadRowkeyAsString
140 , boIgnoreUnspecifiedColumnFamilies
155 , boIgnoreUnspecifiedColumnFamilies
141 , boColumnFamilies
156 , boColumnFamilies
142
157
@@ -180,6 +195,7 @@ module Network.Google.BigQuery.Types
180 , gqrrTotalBytesProcessed
195 , gqrrTotalBytesProcessed
181 , gqrrRows
196 , gqrrRows
182 , gqrrPageToken
197 , gqrrPageToken
198+ , gqrrNumDmlAffectedRows
183 , gqrrTotalRows
199 , gqrrTotalRows
184 , gqrrErrors
200 , gqrrErrors
185 , gqrrJobComplete
201 , gqrrJobComplete
@@ -199,7 +215,9 @@ module Network.Google.BigQuery.Types
199 , qrUseQueryCache
215 , qrUseQueryCache
200 , qrPreserveNulls
216 , qrPreserveNulls
201 , qrKind
217 , qrKind
218+ , qrQueryParameters
202 , qrQuery
219 , qrQuery
220+ , qrParameterMode
203 , qrTimeoutMs
221 , qrTimeoutMs
204 , qrUseLegacySQL
222 , qrUseLegacySQL
205 , qrDryRun
223 , qrDryRun
@@ -209,6 +227,13 @@ module Network.Google.BigQuery.Types
209 -- * JobsListProjection
227 -- * JobsListProjection
210 , JobsListProjection (..)
228 , JobsListProjection (..)
211
229
230+ -- * QueryParameter
231+ , QueryParameter
232+ , queryParameter
233+ , qpParameterValue
234+ , qpParameterType
235+ , qpName
236+
212 -- * JobStatistics4
237 -- * JobStatistics4
213 , JobStatistics4
238 , JobStatistics4
214 , jobStatistics4
239 , jobStatistics4
@@ -246,6 +271,7 @@ module Network.Google.BigQuery.Types
246 , jclAllowJaggedRows
271 , jclAllowJaggedRows
247 , jclSchemaInline
272 , jclSchemaInline
248 , jclIgnoreUnknownValues
273 , jclIgnoreUnknownValues
274+ , jclSchemaUpdateOptions
249 , jclCreateDisPosition
275 , jclCreateDisPosition
250 , jclSchemaInlineFormat
276 , jclSchemaInlineFormat
251 , jclAllowQuotedNewlines
277 , jclAllowQuotedNewlines
@@ -326,6 +352,16 @@ module Network.Google.BigQuery.Types
326 , tpExpirationMs
352 , tpExpirationMs
327 , tpType
353 , tpType
328
354
355+ -- * QueryParameterValueStructValues
356+ , QueryParameterValueStructValues
357+ , queryParameterValueStructValues
358+ , qpvsvAddtional
359+
360+ -- * DataSetLabels
361+ , DataSetLabels
362+ , dataSetLabels
363+ , dslAddtional
364+
329 -- * JobConfiguration
365 -- * JobConfiguration
330 , JobConfiguration
366 , JobConfiguration
331 , jobConfiguration
367 , jobConfiguration
@@ -333,6 +369,7 @@ module Network.Google.BigQuery.Types
333 , jcLoad
369 , jcLoad
334 , jcQuery
370 , jcQuery
335 , jcExtract
371 , jcExtract
372+ , jcLabels
336 , jcDryRun
373 , jcDryRun
337
374
338 -- * Job
375 -- * Job
@@ -385,12 +422,16 @@ module Network.Google.BigQuery.Types
385 , jcqUseQueryCache
422 , jcqUseQueryCache
386 , jcqPreserveNulls
423 , jcqPreserveNulls
387 , jcqTableDefinitions
424 , jcqTableDefinitions
425+ , jcqQueryParameters
426+ , jcqSchemaUpdateOptions
427+ , jcqMaximumBytesBilled
388 , jcqCreateDisPosition
428 , jcqCreateDisPosition
389 , jcqUserDefinedFunctionResources
429 , jcqUserDefinedFunctionResources
390 , jcqAllowLargeResults
430 , jcqAllowLargeResults
391 , jcqMaximumBillingTier
431 , jcqMaximumBillingTier
392 , jcqQuery
432 , jcqQuery
393 , jcqFlattenResults
433 , jcqFlattenResults
434+ , jcqParameterMode
394 , jcqUseLegacySQL
435 , jcqUseLegacySQL
395 , jcqDefaultDataSet
436 , jcqDefaultDataSet
396
437
@@ -423,11 +464,19 @@ module Network.Google.BigQuery.Types
423 , tableCell
464 , tableCell
424 , tcV
465 , tcV
425
466
467+ -- * QueryParameterValue
468+ , QueryParameterValue
469+ , queryParameterValue
470+ , qpvStructValues
471+ , qpvValue
472+ , qpvArrayValues
473+
426 -- * ViewDefinition
474 -- * ViewDefinition
427 , ViewDefinition
475 , ViewDefinition
428 , viewDefinition
476 , viewDefinition
429 , vdUserDefinedFunctionResources
477 , vdUserDefinedFunctionResources
430 , vdQuery
478 , vdQuery
479+ , vdUseLegacySQL
431
480
432 -- * UserDefinedFunctionResource
481 -- * UserDefinedFunctionResource
433 , UserDefinedFunctionResource
482 , UserDefinedFunctionResource
@@ -441,7 +490,9 @@ module Network.Google.BigQuery.Types
441 , jSchema
490 , jSchema
442 , jTotalBytesProcessed
491 , jTotalBytesProcessed
443 , jBillingTier
492 , jBillingTier
493+ , jUndeclaredQueryParameters
444 , jReferencedTables
494 , jReferencedTables
495+ , jNumDmlAffectedRows
445 , jQueryPlan
496 , jQueryPlan
446 , jCacheHit
497 , jCacheHit
447 , jTotalBytesBilled
498 , jTotalBytesBilled
@@ -469,6 +520,13 @@ module Network.Google.BigQuery.Types
469 , tKind
520 , tKind
470 , tInsertErrors
521 , tInsertErrors
471
522
523+ -- * QueryParameterType
524+ , QueryParameterType
525+ , queryParameterType
526+ , qptStructTypes
527+ , qptType
528+ , qptArrayType
529+
472 -- * Table
530 -- * Table
473 , Table
531 , Table
474 , table
532 , table
@@ -528,10 +586,16 @@ module Network.Google.BigQuery.Types
528 , qTotalBytesProcessed
586 , qTotalBytesProcessed
529 , qRows
587 , qRows
530 , qPageToken
588 , qPageToken
589+ , qNumDmlAffectedRows
531 , qTotalRows
590 , qTotalRows
532 , qErrors
591 , qErrors
533 , qJobComplete
592 , qJobComplete
534 , qCacheHit
593 , qCacheHit
594+
595+ -- * DataSetListDataSetsItemLabels
596+ , DataSetListDataSetsItemLabels
597+ , dataSetListDataSetsItemLabels
598+ , dsldsilAddtional
535 ) where
599 ) where
536
600
537import Network.Google.BigQuery.Types.Product
601import Network.Google.BigQuery.Types.Product
gogol-bigquery/gen/Network/Google/BigQuery/Types/Product.hs+673−36
@@ -155,6 +155,7 @@ data DataSetListDataSetsItem = DataSetListDataSetsItem'
155 , _dsldsiKind :: !Text
155 , _dsldsiKind :: !Text
156 , _dsldsiDataSetReference :: !(Maybe DataSetReference)
156 , _dsldsiDataSetReference :: !(Maybe DataSetReference)
157 , _dsldsiId :: !(Maybe Text)
157 , _dsldsiId :: !(Maybe Text)
158+ , _dsldsiLabels :: !(Maybe DataSetListDataSetsItemLabels)
158 } deriving (Eq,Show,Data,Typeable,Generic)
159 } deriving (Eq,Show,Data,Typeable,Generic)
159
160
160-- | Creates a value of 'DataSetListDataSetsItem' with the minimum fields required to make a request.
161-- | Creates a value of 'DataSetListDataSetsItem' with the minimum fields required to make a request.
@@ -168,6 +169,8 @@ data DataSetListDataSetsItem = DataSetListDataSetsItem'
168-- * 'dsldsiDataSetReference'
169-- * 'dsldsiDataSetReference'
169--
170--
170-- * 'dsldsiId'
171-- * 'dsldsiId'
172+--
173+-- * 'dsldsiLabels'
171dataSetListDataSetsItem
174dataSetListDataSetsItem
172 :: DataSetListDataSetsItem
175 :: DataSetListDataSetsItem
173dataSetListDataSetsItem =
176dataSetListDataSetsItem =
@@ -176,6 +179,7 @@ dataSetListDataSetsItem =
176 , _dsldsiKind = "bigquery#dataset"
179 , _dsldsiKind = "bigquery#dataset"
177 , _dsldsiDataSetReference = Nothing
180 , _dsldsiDataSetReference = Nothing
178 , _dsldsiId = Nothing
181 , _dsldsiId = Nothing
182+ , _dsldsiLabels = Nothing
179 }
183 }
180
184
181-- | A descriptive name for the dataset, if one exists.
185-- | A descriptive name for the dataset, if one exists.
@@ -201,6 +205,12 @@ dsldsiDataSetReference
201dsldsiId :: Lens' DataSetListDataSetsItem (Maybe Text)
205dsldsiId :: Lens' DataSetListDataSetsItem (Maybe Text)
202dsldsiId = lens _dsldsiId (\ s a -> s{_dsldsiId = a})
206dsldsiId = lens _dsldsiId (\ s a -> s{_dsldsiId = a})
203
207
208+-- | [Experimental] The labels associated with this dataset. You can use
209+-- these to organize and group your datasets.
210+dsldsiLabels :: Lens' DataSetListDataSetsItem (Maybe DataSetListDataSetsItemLabels)
211+dsldsiLabels
212+ = lens _dsldsiLabels (\ s a -> s{_dsldsiLabels = a})
213+
204instance FromJSON DataSetListDataSetsItem where
214instance FromJSON DataSetListDataSetsItem where
205 parseJSON
215 parseJSON
206 = withObject "DataSetListDataSetsItem"
216 = withObject "DataSetListDataSetsItem"
@@ -209,7 +219,8 @@ instance FromJSON DataSetListDataSetsItem where
209 (o .:? "friendlyName") <*>
219 (o .:? "friendlyName") <*>
210 (o .:? "kind" .!= "bigquery#dataset")
220 (o .:? "kind" .!= "bigquery#dataset")
211 <*> (o .:? "datasetReference")
221 <*> (o .:? "datasetReference")
212− <*> (o .:? "id"))
222+ <*> (o .:? "id")
223+ <*> (o .:? "labels"))
213
224
214instance ToJSON DataSetListDataSetsItem where
225instance ToJSON DataSetListDataSetsItem where
215 toJSON DataSetListDataSetsItem'{..}
226 toJSON DataSetListDataSetsItem'{..}
@@ -218,7 +229,8 @@ instance ToJSON DataSetListDataSetsItem where
218 [("friendlyName" .=) <$> _dsldsiFriendlyName,
229 [("friendlyName" .=) <$> _dsldsiFriendlyName,
219 Just ("kind" .= _dsldsiKind),
230 Just ("kind" .= _dsldsiKind),
220 ("datasetReference" .=) <$> _dsldsiDataSetReference,
231 ("datasetReference" .=) <$> _dsldsiDataSetReference,
221− ("id" .=) <$> _dsldsiId])
232+ ("id" .=) <$> _dsldsiId,
233+ ("labels" .=) <$> _dsldsiLabels])
222
234
223--
235--
224-- /See:/ 'tableDataList' smart constructor.
236-- /See:/ 'tableDataList' smart constructor.
@@ -640,6 +652,66 @@ instance ToJSON ExplainQueryStep where
640 [("substeps" .=) <$> _eqsSubsteps,
652 [("substeps" .=) <$> _eqsSubsteps,
641 ("kind" .=) <$> _eqsKind])
653 ("kind" .=) <$> _eqsKind])
642
654
655+--
656+-- /See:/ 'queryParameterTypeStructTypesItem' smart constructor.
657+data QueryParameterTypeStructTypesItem = QueryParameterTypeStructTypesItem'
658+ { _qptstiName :: !(Maybe Text)
659+ , _qptstiType :: !(Maybe QueryParameterType)
660+ , _qptstiDescription :: !(Maybe Text)
661+ } deriving (Eq,Show,Data,Typeable,Generic)
662+
663+-- | Creates a value of 'QueryParameterTypeStructTypesItem' with the minimum fields required to make a request.
664+--
665+-- Use one of the following lenses to modify other fields as desired:
666+--
667+-- * 'qptstiName'
668+--
669+-- * 'qptstiType'
670+--
671+-- * 'qptstiDescription'
672+queryParameterTypeStructTypesItem
673+ :: QueryParameterTypeStructTypesItem
674+queryParameterTypeStructTypesItem =
675+ QueryParameterTypeStructTypesItem'
676+ { _qptstiName = Nothing
677+ , _qptstiType = Nothing
678+ , _qptstiDescription = Nothing
679+ }
680+
681+-- | [Optional] The name of this field.
682+qptstiName :: Lens' QueryParameterTypeStructTypesItem (Maybe Text)
683+qptstiName
684+ = lens _qptstiName (\ s a -> s{_qptstiName = a})
685+
686+-- | [Required] The type of this field.
687+qptstiType :: Lens' QueryParameterTypeStructTypesItem (Maybe QueryParameterType)
688+qptstiType
689+ = lens _qptstiType (\ s a -> s{_qptstiType = a})
690+
691+-- | [Optional] Human-oriented description of the field.
692+qptstiDescription :: Lens' QueryParameterTypeStructTypesItem (Maybe Text)
693+qptstiDescription
694+ = lens _qptstiDescription
695+ (\ s a -> s{_qptstiDescription = a})
696+
697+instance FromJSON QueryParameterTypeStructTypesItem
698+ where
699+ parseJSON
700+ = withObject "QueryParameterTypeStructTypesItem"
701+ (\ o ->
702+ QueryParameterTypeStructTypesItem' <$>
703+ (o .:? "name") <*> (o .:? "type") <*>
704+ (o .:? "description"))
705+
706+instance ToJSON QueryParameterTypeStructTypesItem
707+ where
708+ toJSON QueryParameterTypeStructTypesItem'{..}
709+ = object
710+ (catMaybes
711+ [("name" .=) <$> _qptstiName,
712+ ("type" .=) <$> _qptstiType,
713+ ("description" .=) <$> _qptstiDescription])
714+
643--
715--
644-- /See:/ 'bigtableColumnFamily' smart constructor.
716-- /See:/ 'bigtableColumnFamily' smart constructor.
645data BigtableColumnFamily = BigtableColumnFamily'
717data BigtableColumnFamily = BigtableColumnFamily'
@@ -701,7 +773,7 @@ bcfOnlyReadLatest
701-- | [Optional] The type to convert the value in cells of this column family.
773-- | [Optional] The type to convert the value in cells of this column family.
702-- The values are expected to be encoded using HBase Bytes.toBytes function
774-- The values are expected to be encoded using HBase Bytes.toBytes function
703-- when using the BINARY encoding value. Following BigQuery types are
775-- when using the BINARY encoding value. Following BigQuery types are
704−-- allowed (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Defaut
776+-- allowed (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Default
705-- type is BYTES. This can be overridden for a specific column by listing
777-- type is BYTES. This can be overridden for a specific column by listing
706-- that column in \'columns\' and specifying a type for it.
778-- that column in \'columns\' and specifying a type for it.
707bcfType :: Lens' BigtableColumnFamily (Maybe Text)
779bcfType :: Lens' BigtableColumnFamily (Maybe Text)
@@ -848,6 +920,46 @@ instance ToJSON JobStatistics where
848 ("query" .=) <$> _jsQuery,
920 ("query" .=) <$> _jsQuery,
849 ("extract" .=) <$> _jsExtract])
921 ("extract" .=) <$> _jsExtract])
850
922
923+-- | [Experimental] The labels associated with this job. You can use these to
924+-- organize and group your jobs. Label keys and values can be no longer
925+-- than 63 characters, can only contain letters, numeric characters,
926+-- underscores and dashes. International characters are allowed. Label
927+-- values are optional. Label keys must start with a letter and must be
928+-- unique within a dataset. Both keys and values are additionally
929+-- constrained to be \<= 128 bytes in size.
930+--
931+-- /See:/ 'jobConfigurationLabels' smart constructor.
932+newtype JobConfigurationLabels = JobConfigurationLabels'
933+ { _jclAddtional :: HashMap Text Text
934+ } deriving (Eq,Show,Data,Typeable,Generic)
935+
936+-- | Creates a value of 'JobConfigurationLabels' with the minimum fields required to make a request.
937+--
938+-- Use one of the following lenses to modify other fields as desired:
939+--
940+-- * 'jclAddtional'
941+jobConfigurationLabels
942+ :: HashMap Text Text -- ^ 'jclAddtional'
943+ -> JobConfigurationLabels
944+jobConfigurationLabels pJclAddtional_ =
945+ JobConfigurationLabels'
946+ { _jclAddtional = _Coerce # pJclAddtional_
947+ }
948+
949+jclAddtional :: Lens' JobConfigurationLabels (HashMap Text Text)
950+jclAddtional
951+ = lens _jclAddtional (\ s a -> s{_jclAddtional = a})
952+ . _Coerce
953+
954+instance FromJSON JobConfigurationLabels where
955+ parseJSON
956+ = withObject "JobConfigurationLabels"
957+ (\ o ->
958+ JobConfigurationLabels' <$> (parseJSONObject o))
959+
960+instance ToJSON JobConfigurationLabels where
961+ toJSON = toJSON . _jclAddtional
962+
851--
963--
852-- /See:/ 'dataSet' smart constructor.
964-- /See:/ 'dataSet' smart constructor.
853data DataSet = DataSet'
965data DataSet = DataSet'
@@ -861,6 +973,7 @@ data DataSet = DataSet'
861 , _dsDataSetReference :: !(Maybe DataSetReference)
973 , _dsDataSetReference :: !(Maybe DataSetReference)
862 , _dsSelfLink :: !(Maybe Text)
974 , _dsSelfLink :: !(Maybe Text)
863 , _dsId :: !(Maybe Text)
975 , _dsId :: !(Maybe Text)
976+ , _dsLabels :: !(Maybe DataSetLabels)
864 , _dsDefaultTableExpirationMs :: !(Maybe (Textual Int64))
977 , _dsDefaultTableExpirationMs :: !(Maybe (Textual Int64))
865 , _dsDescription :: !(Maybe Text)
978 , _dsDescription :: !(Maybe Text)
866 } deriving (Eq,Show,Data,Typeable,Generic)
979 } deriving (Eq,Show,Data,Typeable,Generic)
@@ -889,6 +1002,8 @@ data DataSet = DataSet'
889--
1002--
890-- * 'dsId'
1003-- * 'dsId'
891--
1004--
1005+-- * 'dsLabels'
1006+--
892-- * 'dsDefaultTableExpirationMs'
1007-- * 'dsDefaultTableExpirationMs'
893--
1008--
894-- * 'dsDescription'
1009-- * 'dsDescription'
@@ -906,6 +1021,7 @@ dataSet =
906 , _dsDataSetReference = Nothing
1021 , _dsDataSetReference = Nothing
907 , _dsSelfLink = Nothing
1022 , _dsSelfLink = Nothing
908 , _dsId = Nothing
1023 , _dsId = Nothing
1024+ , _dsLabels = Nothing
909 , _dsDefaultTableExpirationMs = Nothing
1025 , _dsDefaultTableExpirationMs = Nothing
910 , _dsDescription = Nothing
1026 , _dsDescription = Nothing
911 }
1027 }
@@ -979,6 +1095,13 @@ dsSelfLink
979dsId :: Lens' DataSet (Maybe Text)
1095dsId :: Lens' DataSet (Maybe Text)
980dsId = lens _dsId (\ s a -> s{_dsId = a})
1096dsId = lens _dsId (\ s a -> s{_dsId = a})
981
1097
1098+-- | [Experimental] The labels associated with this dataset. You can use
1099+-- these to organize and group your datasets. You can set this property
1100+-- when inserting or updating a dataset. See Labeling Datasets for more
1101+-- information.
1102+dsLabels :: Lens' DataSet (Maybe DataSetLabels)
1103+dsLabels = lens _dsLabels (\ s a -> s{_dsLabels = a})
1104+
982-- | [Optional] The default lifetime of all tables in the dataset, in
1105-- | [Optional] The default lifetime of all tables in the dataset, in
983-- milliseconds. The minimum value is 3600000 milliseconds (one hour). Once
1106-- milliseconds. The minimum value is 3600000 milliseconds (one hour). Once
984-- this property is set, all newly-created tables in the dataset will have
1107-- this property is set, all newly-created tables in the dataset will have
@@ -1016,6 +1139,7 @@ instance FromJSON DataSet where
1016 <*> (o .:? "datasetReference")
1139 <*> (o .:? "datasetReference")
1017 <*> (o .:? "selfLink")
1140 <*> (o .:? "selfLink")
1018 <*> (o .:? "id")
1141 <*> (o .:? "id")
1142+ <*> (o .:? "labels")
1019 <*> (o .:? "defaultTableExpirationMs")
1143 <*> (o .:? "defaultTableExpirationMs")
1020 <*> (o .:? "description"))
1144 <*> (o .:? "description"))
1021
1145
@@ -1031,6 +1155,7 @@ instance ToJSON DataSet where
1031 ("lastModifiedTime" .=) <$> _dsLastModifiedTime,
1155 ("lastModifiedTime" .=) <$> _dsLastModifiedTime,
1032 ("datasetReference" .=) <$> _dsDataSetReference,
1156 ("datasetReference" .=) <$> _dsDataSetReference,
1033 ("selfLink" .=) <$> _dsSelfLink, ("id" .=) <$> _dsId,
1157 ("selfLink" .=) <$> _dsSelfLink, ("id" .=) <$> _dsId,
1158+ ("labels" .=) <$> _dsLabels,
1034 ("defaultTableExpirationMs" .=) <$>
1159 ("defaultTableExpirationMs" .=) <$>
1035 _dsDefaultTableExpirationMs,
1160 _dsDefaultTableExpirationMs,
1036 ("description" .=) <$> _dsDescription])
1161 ("description" .=) <$> _dsDescription])
@@ -1038,7 +1163,8 @@ instance ToJSON DataSet where
1038--
1163--
1039-- /See:/ 'bigtableOptions' smart constructor.
1164-- /See:/ 'bigtableOptions' smart constructor.
1040data BigtableOptions = BigtableOptions'
1165data BigtableOptions = BigtableOptions'
1166+ { _boReadRowkeyAsString :: !(Maybe Bool)
1041− { _boIgnoreUnspecifiedColumnFamilies :: !(Maybe Bool)
1167+ , _boIgnoreUnspecifiedColumnFamilies :: !(Maybe Bool)
1042 , _boColumnFamilies :: !(Maybe [BigtableColumnFamily])
1168 , _boColumnFamilies :: !(Maybe [BigtableColumnFamily])
1043 } deriving (Eq,Show,Data,Typeable,Generic)
1169 } deriving (Eq,Show,Data,Typeable,Generic)
1044
1170
@@ -1046,6 +1172,8 @@ data BigtableOptions = BigtableOptions'
1046--
1172--
1047-- Use one of the following lenses to modify other fields as desired:
1173-- Use one of the following lenses to modify other fields as desired:
1048--
1174--
1175+-- * 'boReadRowkeyAsString'
1176+--
1049-- * 'boIgnoreUnspecifiedColumnFamilies'
1177-- * 'boIgnoreUnspecifiedColumnFamilies'
1050--
1178--
1051-- * 'boColumnFamilies'
1179-- * 'boColumnFamilies'
@@ -1053,10 +1181,20 @@ bigtableOptions
1053 :: BigtableOptions
1181 :: BigtableOptions
1054bigtableOptions =
1182bigtableOptions =
1055 BigtableOptions'
1183 BigtableOptions'
1184+ { _boReadRowkeyAsString = Nothing
1056− { _boIgnoreUnspecifiedColumnFamilies = Nothing
1185+ , _boIgnoreUnspecifiedColumnFamilies = Nothing
1057 , _boColumnFamilies = Nothing
1186 , _boColumnFamilies = Nothing
1058 }
1187 }
1059
1188
1189+-- | [Optional] If field is true, then the rowkey column families will be
1190+-- read and converted to string. Otherwise they are read with BYTES type
1191+-- values and users need to manually cast them with CAST if necessary. The
1192+-- default value is false.
1193+boReadRowkeyAsString :: Lens' BigtableOptions (Maybe Bool)
1194+boReadRowkeyAsString
1195+ = lens _boReadRowkeyAsString
1196+ (\ s a -> s{_boReadRowkeyAsString = a})
1197+
1060-- | [Optional] If field is true, then the column families that are not
1198-- | [Optional] If field is true, then the column families that are not
1061-- specified in columnFamilies list are not exposed in the table schema.
1199-- specified in columnFamilies list are not exposed in the table schema.
1062-- Otherwise, they are read with BYTES type values. The default value is
1200-- Otherwise, they are read with BYTES type values. The default value is
@@ -1085,14 +1223,16 @@ instance FromJSON BigtableOptions where
1085 = withObject "BigtableOptions"
1223 = withObject "BigtableOptions"
1086 (\ o ->
1224 (\ o ->
1087 BigtableOptions' <$>
1225 BigtableOptions' <$>
1226+ (o .:? "readRowkeyAsString") <*>
1088− (o .:? "ignoreUnspecifiedColumnFamilies") <*>
1227+ (o .:? "ignoreUnspecifiedColumnFamilies")
1089− (o .:? "columnFamilies" .!= mempty))
1228+ <*> (o .:? "columnFamilies" .!= mempty))
1090
1229
1091instance ToJSON BigtableOptions where
1230instance ToJSON BigtableOptions where
1092 toJSON BigtableOptions'{..}
1231 toJSON BigtableOptions'{..}
1093 = object
1232 = object
1094 (catMaybes
1233 (catMaybes
1234+ [("readRowkeyAsString" .=) <$> _boReadRowkeyAsString,
1095− [("ignoreUnspecifiedColumnFamilies" .=) <$>
1235+ ("ignoreUnspecifiedColumnFamilies" .=) <$>
1096 _boIgnoreUnspecifiedColumnFamilies,
1236 _boIgnoreUnspecifiedColumnFamilies,
1097 ("columnFamilies" .=) <$> _boColumnFamilies])
1237 ("columnFamilies" .=) <$> _boColumnFamilies])
1098
1238
@@ -1383,8 +1523,8 @@ tfsName :: Lens' TableFieldSchema (Maybe Text)
1383tfsName = lens _tfsName (\ s a -> s{_tfsName = a})
1523tfsName = lens _tfsName (\ s a -> s{_tfsName = a})
1384
1524
1385-- | [Required] The field data type. Possible values include STRING, BYTES,
1525-- | [Required] The field data type. Possible values include STRING, BYTES,
1386−-- INTEGER, FLOAT, BOOLEAN, TIMESTAMP or RECORD (where RECORD indicates
1526+-- INTEGER, FLOAT, BOOLEAN, TIMESTAMP, DATE, TIME, DATETIME, or RECORD
1387−-- that the field contains a nested schema).
1527+-- (where RECORD indicates that the field contains a nested schema).
1388tfsType :: Lens' TableFieldSchema (Maybe Text)
1528tfsType :: Lens' TableFieldSchema (Maybe Text)
1389tfsType = lens _tfsType (\ s a -> s{_tfsType = a})
1529tfsType = lens _tfsType (\ s a -> s{_tfsType = a})
1390
1530
@@ -1430,6 +1570,7 @@ data GetQueryResultsResponse = GetQueryResultsResponse'
1430 , _gqrrTotalBytesProcessed :: !(Maybe (Textual Int64))
1570 , _gqrrTotalBytesProcessed :: !(Maybe (Textual Int64))
1431 , _gqrrRows :: !(Maybe [TableRow])
1571 , _gqrrRows :: !(Maybe [TableRow])
1432 , _gqrrPageToken :: !(Maybe Text)
1572 , _gqrrPageToken :: !(Maybe Text)
1573+ , _gqrrNumDmlAffectedRows :: !(Maybe (Textual Int64))
1433 , _gqrrTotalRows :: !(Maybe (Textual Word64))
1574 , _gqrrTotalRows :: !(Maybe (Textual Word64))
1434 , _gqrrErrors :: !(Maybe [ErrorProto])
1575 , _gqrrErrors :: !(Maybe [ErrorProto])
1435 , _gqrrJobComplete :: !(Maybe Bool)
1576 , _gqrrJobComplete :: !(Maybe Bool)
@@ -1454,6 +1595,8 @@ data GetQueryResultsResponse = GetQueryResultsResponse'
1454--
1595--
1455-- * 'gqrrPageToken'
1596-- * 'gqrrPageToken'
1456--
1597--
1598+-- * 'gqrrNumDmlAffectedRows'
1599+--
1457-- * 'gqrrTotalRows'
1600-- * 'gqrrTotalRows'
1458--
1601--
1459-- * 'gqrrErrors'
1602-- * 'gqrrErrors'
@@ -1472,6 +1615,7 @@ getQueryResultsResponse =
1472 , _gqrrTotalBytesProcessed = Nothing
1615 , _gqrrTotalBytesProcessed = Nothing
1473 , _gqrrRows = Nothing
1616 , _gqrrRows = Nothing
1474 , _gqrrPageToken = Nothing
1617 , _gqrrPageToken = Nothing
1618+ , _gqrrNumDmlAffectedRows = Nothing
1475 , _gqrrTotalRows = Nothing
1619 , _gqrrTotalRows = Nothing
1476 , _gqrrErrors = Nothing
1620 , _gqrrErrors = Nothing
1477 , _gqrrJobComplete = Nothing
1621 , _gqrrJobComplete = Nothing
@@ -1526,6 +1670,14 @@ gqrrPageToken
1526 = lens _gqrrPageToken
1670 = lens _gqrrPageToken
1527 (\ s a -> s{_gqrrPageToken = a})
1671 (\ s a -> s{_gqrrPageToken = a})
1528
1672
1673+-- | [Output-only, Experimental] The number of rows affected by a DML
1674+-- statement. Present only for DML statements INSERT, UPDATE or DELETE.
1675+gqrrNumDmlAffectedRows :: Lens' GetQueryResultsResponse (Maybe Int64)
1676+gqrrNumDmlAffectedRows
1677+ = lens _gqrrNumDmlAffectedRows
1678+ (\ s a -> s{_gqrrNumDmlAffectedRows = a})
1679+ . mapping _Coerce
1680+
1529-- | The total number of rows in the complete query result set, which can be
1681-- | The total number of rows in the complete query result set, which can be
1530-- more than the number of rows in this single page of results. Present
1682-- more than the number of rows in this single page of results. Present
1531-- only when the query completes successfully.
1683-- only when the query completes successfully.
@@ -1568,6 +1720,7 @@ instance FromJSON GetQueryResultsResponse where
1568 <*> (o .:? "totalBytesProcessed")
1720 <*> (o .:? "totalBytesProcessed")
1569 <*> (o .:? "rows" .!= mempty)
1721 <*> (o .:? "rows" .!= mempty)
1570 <*> (o .:? "pageToken")
1722 <*> (o .:? "pageToken")
1723+ <*> (o .:? "numDmlAffectedRows")
1571 <*> (o .:? "totalRows")
1724 <*> (o .:? "totalRows")
1572 <*> (o .:? "errors" .!= mempty)
1725 <*> (o .:? "errors" .!= mempty)
1573 <*> (o .:? "jobComplete")
1726 <*> (o .:? "jobComplete")
@@ -1585,6 +1738,8 @@ instance ToJSON GetQueryResultsResponse where
1585 _gqrrTotalBytesProcessed,
1738 _gqrrTotalBytesProcessed,
1586 ("rows" .=) <$> _gqrrRows,
1739 ("rows" .=) <$> _gqrrRows,
1587 ("pageToken" .=) <$> _gqrrPageToken,
1740 ("pageToken" .=) <$> _gqrrPageToken,
1741+ ("numDmlAffectedRows" .=) <$>
1742+ _gqrrNumDmlAffectedRows,
1588 ("totalRows" .=) <$> _gqrrTotalRows,
1743 ("totalRows" .=) <$> _gqrrTotalRows,
1589 ("errors" .=) <$> _gqrrErrors,
1744 ("errors" .=) <$> _gqrrErrors,
1590 ("jobComplete" .=) <$> _gqrrJobComplete,
1745 ("jobComplete" .=) <$> _gqrrJobComplete,
@@ -1668,15 +1823,17 @@ instance ToJSON DataSetList where
1668--
1823--
1669-- /See:/ 'queryRequest' smart constructor.
1824-- /See:/ 'queryRequest' smart constructor.
1670data QueryRequest = QueryRequest'
1825data QueryRequest = QueryRequest'
1671− { _qrUseQueryCache :: !Bool
1826+ { _qrUseQueryCache :: !Bool
1672− , _qrPreserveNulls :: !(Maybe Bool)
1827+ , _qrPreserveNulls :: !(Maybe Bool)
1673− , _qrKind :: !Text
1828+ , _qrKind :: !Text
1829+ , _qrQueryParameters :: !(Maybe [QueryParameter])
1674− , _qrQuery :: !(Maybe Text)
1830+ , _qrQuery :: !(Maybe Text)
1831+ , _qrParameterMode :: !(Maybe Text)
1675− , _qrTimeoutMs :: !(Maybe (Textual Word32))
1832+ , _qrTimeoutMs :: !(Maybe (Textual Word32))
1676− , _qrUseLegacySQL :: !(Maybe Bool)
1833+ , _qrUseLegacySQL :: !Bool
1677− , _qrDryRun :: !(Maybe Bool)
1834+ , _qrDryRun :: !(Maybe Bool)
1678− , _qrMaxResults :: !(Maybe (Textual Word32))
1835+ , _qrMaxResults :: !(Maybe (Textual Word32))
1679− , _qrDefaultDataSet :: !(Maybe DataSetReference)
1836+ , _qrDefaultDataSet :: !(Maybe DataSetReference)
1680 } deriving (Eq,Show,Data,Typeable,Generic)
1837 } deriving (Eq,Show,Data,Typeable,Generic)
1681
1838
1682-- | Creates a value of 'QueryRequest' with the minimum fields required to make a request.
1839-- | Creates a value of 'QueryRequest' with the minimum fields required to make a request.
@@ -1689,8 +1846,12 @@ data QueryRequest = QueryRequest'
1689--
1846--
1690-- * 'qrKind'
1847-- * 'qrKind'
1691--
1848--
1849+-- * 'qrQueryParameters'
1850+--
1692-- * 'qrQuery'
1851-- * 'qrQuery'
1693--
1852--
1853+-- * 'qrParameterMode'
1854+--
1694-- * 'qrTimeoutMs'
1855-- * 'qrTimeoutMs'
1695--
1856--
1696-- * 'qrUseLegacySQL'
1857-- * 'qrUseLegacySQL'
@@ -1707,9 +1868,11 @@ queryRequest =
1707 { _qrUseQueryCache = True
1868 { _qrUseQueryCache = True
1708 , _qrPreserveNulls = Nothing
1869 , _qrPreserveNulls = Nothing
1709 , _qrKind = "bigquery#queryRequest"
1870 , _qrKind = "bigquery#queryRequest"
1871+ , _qrQueryParameters = Nothing
1710 , _qrQuery = Nothing
1872 , _qrQuery = Nothing
1873+ , _qrParameterMode = Nothing
1711 , _qrTimeoutMs = Nothing
1874 , _qrTimeoutMs = Nothing
1712− , _qrUseLegacySQL = Nothing
1875+ , _qrUseLegacySQL = True
1713 , _qrDryRun = Nothing
1876 , _qrDryRun = Nothing
1714 , _qrMaxResults = Nothing
1877 , _qrMaxResults = Nothing
1715 , _qrDefaultDataSet = Nothing
1878 , _qrDefaultDataSet = Nothing
@@ -1733,12 +1896,27 @@ qrPreserveNulls
1733qrKind :: Lens' QueryRequest Text
1896qrKind :: Lens' QueryRequest Text
1734qrKind = lens _qrKind (\ s a -> s{_qrKind = a})
1897qrKind = lens _qrKind (\ s a -> s{_qrKind = a})
1735
1898
1899+-- | [Experimental] Query parameters for Standard SQL queries.
1900+qrQueryParameters :: Lens' QueryRequest [QueryParameter]
1901+qrQueryParameters
1902+ = lens _qrQueryParameters
1903+ (\ s a -> s{_qrQueryParameters = a})
1904+ . _Default
1905+ . _Coerce
1906+
1736-- | [Required] A query string, following the BigQuery query syntax, of the
1907-- | [Required] A query string, following the BigQuery query syntax, of the
1737-- query to execute. Example: \"SELECT count(f1) FROM
1908-- query to execute. Example: \"SELECT count(f1) FROM
1738-- [myProjectId:myDatasetId.myTableId]\".
1909-- [myProjectId:myDatasetId.myTableId]\".
1739qrQuery :: Lens' QueryRequest (Maybe Text)
1910qrQuery :: Lens' QueryRequest (Maybe Text)
1740qrQuery = lens _qrQuery (\ s a -> s{_qrQuery = a})
1911qrQuery = lens _qrQuery (\ s a -> s{_qrQuery = a})
1741
1912
1913+-- | [Experimental] Standard SQL only. Whether to use positional (?) or named
1914+-- (\'myparam) query parameters in this query.
1915+qrParameterMode :: Lens' QueryRequest (Maybe Text)
1916+qrParameterMode
1917+ = lens _qrParameterMode
1918+ (\ s a -> s{_qrParameterMode = a})
1919+
1742-- | [Optional] How long to wait for the query to complete, in milliseconds,
1920-- | [Optional] How long to wait for the query to complete, in milliseconds,
1743-- before the request times out and returns. Note that this is only a
1921-- before the request times out and returns. Note that this is only a
1744-- timeout for the request, not the query. If the query takes longer to run
1922-- timeout for the request, not the query. If the query takes longer to run
@@ -1758,7 +1936,7 @@ qrTimeoutMs
1758-- is set to false, the values of allowLargeResults and flattenResults are
1936-- is set to false, the values of allowLargeResults and flattenResults are
1759-- ignored; query will be run as if allowLargeResults is true and
1937-- ignored; query will be run as if allowLargeResults is true and
1760-- flattenResults is false.
1938-- flattenResults is false.
1761−qrUseLegacySQL :: Lens' QueryRequest (Maybe Bool)
1939+qrUseLegacySQL :: Lens' QueryRequest Bool
1762qrUseLegacySQL
1940qrUseLegacySQL
1763 = lens _qrUseLegacySQL
1941 = lens _qrUseLegacySQL
1764 (\ s a -> s{_qrUseLegacySQL = a})
1942 (\ s a -> s{_qrUseLegacySQL = a})
@@ -1797,9 +1975,11 @@ instance FromJSON QueryRequest where
1797 (o .:? "useQueryCache" .!= True) <*>
1975 (o .:? "useQueryCache" .!= True) <*>
1798 (o .:? "preserveNulls")
1976 (o .:? "preserveNulls")
1799 <*> (o .:? "kind" .!= "bigquery#queryRequest")
1977 <*> (o .:? "kind" .!= "bigquery#queryRequest")
1978+ <*> (o .:? "queryParameters" .!= mempty)
1800 <*> (o .:? "query")
1979 <*> (o .:? "query")
1980+ <*> (o .:? "parameterMode")
1801 <*> (o .:? "timeoutMs")
1981 <*> (o .:? "timeoutMs")
1802− <*> (o .:? "useLegacySql")
1982+ <*> (o .:? "useLegacySql" .!= True)
1803 <*> (o .:? "dryRun")
1983 <*> (o .:? "dryRun")
1804 <*> (o .:? "maxResults")
1984 <*> (o .:? "maxResults")
1805 <*> (o .:? "defaultDataset"))
1985 <*> (o .:? "defaultDataset"))
@@ -1810,13 +1990,75 @@ instance ToJSON QueryRequest where
1810 (catMaybes
1990 (catMaybes
1811 [Just ("useQueryCache" .= _qrUseQueryCache),
1991 [Just ("useQueryCache" .= _qrUseQueryCache),
1812 ("preserveNulls" .=) <$> _qrPreserveNulls,
1992 ("preserveNulls" .=) <$> _qrPreserveNulls,
1813− Just ("kind" .= _qrKind), ("query" .=) <$> _qrQuery,
1993+ Just ("kind" .= _qrKind),
1994+ ("queryParameters" .=) <$> _qrQueryParameters,
1995+ ("query" .=) <$> _qrQuery,
1996+ ("parameterMode" .=) <$> _qrParameterMode,
1814 ("timeoutMs" .=) <$> _qrTimeoutMs,
1997 ("timeoutMs" .=) <$> _qrTimeoutMs,
1815− ("useLegacySql" .=) <$> _qrUseLegacySQL,
1998+ Just ("useLegacySql" .= _qrUseLegacySQL),
1816 ("dryRun" .=) <$> _qrDryRun,
1999 ("dryRun" .=) <$> _qrDryRun,
1817 ("maxResults" .=) <$> _qrMaxResults,
2000 ("maxResults" .=) <$> _qrMaxResults,
1818 ("defaultDataset" .=) <$> _qrDefaultDataSet])
2001 ("defaultDataset" .=) <$> _qrDefaultDataSet])
1819
2002
2003+--
2004+-- /See:/ 'queryParameter' smart constructor.
2005+data QueryParameter = QueryParameter'
2006+ { _qpParameterValue :: !(Maybe QueryParameterValue)
2007+ , _qpParameterType :: !(Maybe QueryParameterType)
2008+ , _qpName :: !(Maybe Text)
2009+ } deriving (Eq,Show,Data,Typeable,Generic)
2010+
2011+-- | Creates a value of 'QueryParameter' with the minimum fields required to make a request.
2012+--
2013+-- Use one of the following lenses to modify other fields as desired:
2014+--
2015+-- * 'qpParameterValue'
2016+--
2017+-- * 'qpParameterType'
2018+--
2019+-- * 'qpName'
2020+queryParameter
2021+ :: QueryParameter
2022+queryParameter =
2023+ QueryParameter'
2024+ { _qpParameterValue = Nothing
2025+ , _qpParameterType = Nothing
2026+ , _qpName = Nothing
2027+ }
2028+
2029+-- | [Required] The value of this parameter.
2030+qpParameterValue :: Lens' QueryParameter (Maybe QueryParameterValue)
2031+qpParameterValue
2032+ = lens _qpParameterValue
2033+ (\ s a -> s{_qpParameterValue = a})
2034+
2035+-- | [Required] The type of this parameter.
2036+qpParameterType :: Lens' QueryParameter (Maybe QueryParameterType)
2037+qpParameterType
2038+ = lens _qpParameterType
2039+ (\ s a -> s{_qpParameterType = a})
2040+
2041+-- | [Optional] If unset, this is a positional parameter. Otherwise, should
2042+-- be unique within a query.
2043+qpName :: Lens' QueryParameter (Maybe Text)
2044+qpName = lens _qpName (\ s a -> s{_qpName = a})
2045+
2046+instance FromJSON QueryParameter where
2047+ parseJSON
2048+ = withObject "QueryParameter"
2049+ (\ o ->
2050+ QueryParameter' <$>
2051+ (o .:? "parameterValue") <*> (o .:? "parameterType")
2052+ <*> (o .:? "name"))
2053+
2054+instance ToJSON QueryParameter where
2055+ toJSON QueryParameter'{..}
2056+ = object
2057+ (catMaybes
2058+ [("parameterValue" .=) <$> _qpParameterValue,
2059+ ("parameterType" .=) <$> _qpParameterType,
2060+ ("name" .=) <$> _qpName])
2061+
1820--
2062--
1821-- /See:/ 'jobStatistics4' smart constructor.
2063-- /See:/ 'jobStatistics4' smart constructor.
1822newtype JobStatistics4 = JobStatistics4'
2064newtype JobStatistics4 = JobStatistics4'
@@ -2093,6 +2335,7 @@ data JobConfigurationLoad = JobConfigurationLoad'
2093 , _jclAllowJaggedRows :: !(Maybe Bool)
2335 , _jclAllowJaggedRows :: !(Maybe Bool)
2094 , _jclSchemaInline :: !(Maybe Text)
2336 , _jclSchemaInline :: !(Maybe Text)
2095 , _jclIgnoreUnknownValues :: !(Maybe Bool)
2337 , _jclIgnoreUnknownValues :: !(Maybe Bool)
2338+ , _jclSchemaUpdateOptions :: !(Maybe [Text])
2096 , _jclCreateDisPosition :: !(Maybe Text)
2339 , _jclCreateDisPosition :: !(Maybe Text)
2097 , _jclSchemaInlineFormat :: !(Maybe Text)
2340 , _jclSchemaInlineFormat :: !(Maybe Text)
2098 , _jclAllowQuotedNewlines :: !(Maybe Bool)
2341 , _jclAllowQuotedNewlines :: !(Maybe Bool)
@@ -2124,6 +2367,8 @@ data JobConfigurationLoad = JobConfigurationLoad'
2124--
2367--
2125-- * 'jclIgnoreUnknownValues'
2368-- * 'jclIgnoreUnknownValues'
2126--
2369--
2370+-- * 'jclSchemaUpdateOptions'
2371+--
2127-- * 'jclCreateDisPosition'
2372-- * 'jclCreateDisPosition'
2128--
2373--
2129-- * 'jclSchemaInlineFormat'
2374-- * 'jclSchemaInlineFormat'
@@ -2156,6 +2401,7 @@ jobConfigurationLoad =
2156 , _jclAllowJaggedRows = Nothing
2401 , _jclAllowJaggedRows = Nothing
2157 , _jclSchemaInline = Nothing
2402 , _jclSchemaInline = Nothing
2158 , _jclIgnoreUnknownValues = Nothing
2403 , _jclIgnoreUnknownValues = Nothing
2404+ , _jclSchemaUpdateOptions = Nothing
2159 , _jclCreateDisPosition = Nothing
2405 , _jclCreateDisPosition = Nothing
2160 , _jclSchemaInlineFormat = Nothing
2406 , _jclSchemaInlineFormat = Nothing
2161 , _jclAllowQuotedNewlines = Nothing
2407 , _jclAllowQuotedNewlines = Nothing
@@ -2241,6 +2487,22 @@ jclIgnoreUnknownValues
2241 = lens _jclIgnoreUnknownValues
2487 = lens _jclIgnoreUnknownValues
2242 (\ s a -> s{_jclIgnoreUnknownValues = a})
2488 (\ s a -> s{_jclIgnoreUnknownValues = a})
2243
2489
2490+-- | [Experimental] Allows the schema of the desitination table to be updated
2491+-- as a side effect of the load job. Schema update options are supported in
2492+-- two cases: when writeDisposition is WRITE_APPEND; when writeDisposition
2493+-- is WRITE_TRUNCATE and the destination table is a partition of a table,
2494+-- specified by partition decorators. For normal tables, WRITE_TRUNCATE
2495+-- will always overwrite the schema. One or more of the following values
2496+-- are specified: ALLOW_FIELD_ADDITION: allow adding a nullable field to
2497+-- the schema. ALLOW_FIELD_RELAXATION: allow relaxing a required field in
2498+-- the original schema to nullable.
2499+jclSchemaUpdateOptions :: Lens' JobConfigurationLoad [Text]
2500+jclSchemaUpdateOptions
2501+ = lens _jclSchemaUpdateOptions
2502+ (\ s a -> s{_jclSchemaUpdateOptions = a})
2503+ . _Default
2504+ . _Coerce
2505+
2244-- | [Optional] Specifies whether the job is allowed to create new tables.
2506-- | [Optional] Specifies whether the job is allowed to create new tables.
2245-- The following values are supported: CREATE_IF_NEEDED: If the table does
2507-- The following values are supported: CREATE_IF_NEEDED: If the table does
2246-- not exist, BigQuery creates the table. CREATE_NEVER: The table must
2508-- not exist, BigQuery creates the table. CREATE_NEVER: The table must
@@ -2350,6 +2612,7 @@ instance FromJSON JobConfigurationLoad where
2350 <*> (o .:? "allowJaggedRows")
2612 <*> (o .:? "allowJaggedRows")
2351 <*> (o .:? "schemaInline")
2613 <*> (o .:? "schemaInline")
2352 <*> (o .:? "ignoreUnknownValues")
2614 <*> (o .:? "ignoreUnknownValues")
2615+ <*> (o .:? "schemaUpdateOptions" .!= mempty)
2353 <*> (o .:? "createDisposition")
2616 <*> (o .:? "createDisposition")
2354 <*> (o .:? "schemaInlineFormat")
2617 <*> (o .:? "schemaInlineFormat")
2355 <*> (o .:? "allowQuotedNewlines")
2618 <*> (o .:? "allowQuotedNewlines")
@@ -2374,6 +2637,8 @@ instance ToJSON JobConfigurationLoad where
2374 ("schemaInline" .=) <$> _jclSchemaInline,
2637 ("schemaInline" .=) <$> _jclSchemaInline,
2375 ("ignoreUnknownValues" .=) <$>
2638 ("ignoreUnknownValues" .=) <$>
2376 _jclIgnoreUnknownValues,
2639 _jclIgnoreUnknownValues,
2640+ ("schemaUpdateOptions" .=) <$>
2641+ _jclSchemaUpdateOptions,
2377 ("createDisposition" .=) <$> _jclCreateDisPosition,
2642 ("createDisposition" .=) <$> _jclCreateDisPosition,
2378 ("schemaInlineFormat" .=) <$> _jclSchemaInlineFormat,
2643 ("schemaInlineFormat" .=) <$> _jclSchemaInlineFormat,
2379 ("allowQuotedNewlines" .=) <$>
2644 ("allowQuotedNewlines" .=) <$>
@@ -2689,7 +2954,7 @@ bcOnlyReadLatest
2689-- | [Optional] The type to convert the value in cells of this column. The
2954-- | [Optional] The type to convert the value in cells of this column. The
2690-- values are expected to be encoded using HBase Bytes.toBytes function
2955-- values are expected to be encoded using HBase Bytes.toBytes function
2691-- when using the BINARY encoding value. Following BigQuery types are
2956-- when using the BINARY encoding value. Following BigQuery types are
2692−-- allowed (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Defaut
2957+-- allowed (case-sensitive) - BYTES STRING INTEGER FLOAT BOOLEAN Default
2693-- type is BYTES. \'type\' can also be set at the column family level.
2958-- type is BYTES. \'type\' can also be set at the column family level.
2694-- However, the setting at this level takes precedence if \'type\' is set
2959-- However, the setting at this level takes precedence if \'type\' is set
2695-- at both levels.
2960-- at both levels.
@@ -3007,6 +3272,80 @@ instance ToJSON TimePartitioning where
3007 [("expirationMs" .=) <$> _tpExpirationMs,
3272 [("expirationMs" .=) <$> _tpExpirationMs,
3008 ("type" .=) <$> _tpType])
3273 ("type" .=) <$> _tpType])
3009
3274
3275+-- | [Optional] The struct field values, in order of the struct type\'s
3276+-- declaration.
3277+--
3278+-- /See:/ 'queryParameterValueStructValues' smart constructor.
3279+newtype QueryParameterValueStructValues = QueryParameterValueStructValues'
3280+ { _qpvsvAddtional :: HashMap Text QueryParameterValue
3281+ } deriving (Eq,Show,Data,Typeable,Generic)
3282+
3283+-- | Creates a value of 'QueryParameterValueStructValues' with the minimum fields required to make a request.
3284+--
3285+-- Use one of the following lenses to modify other fields as desired:
3286+--
3287+-- * 'qpvsvAddtional'
3288+queryParameterValueStructValues
3289+ :: HashMap Text QueryParameterValue -- ^ 'qpvsvAddtional'
3290+ -> QueryParameterValueStructValues
3291+queryParameterValueStructValues pQpvsvAddtional_ =
3292+ QueryParameterValueStructValues'
3293+ { _qpvsvAddtional = _Coerce # pQpvsvAddtional_
3294+ }
3295+
3296+qpvsvAddtional :: Lens' QueryParameterValueStructValues (HashMap Text QueryParameterValue)
3297+qpvsvAddtional
3298+ = lens _qpvsvAddtional
3299+ (\ s a -> s{_qpvsvAddtional = a})
3300+ . _Coerce
3301+
3302+instance FromJSON QueryParameterValueStructValues
3303+ where
3304+ parseJSON
3305+ = withObject "QueryParameterValueStructValues"
3306+ (\ o ->
3307+ QueryParameterValueStructValues' <$>
3308+ (parseJSONObject o))
3309+
3310+instance ToJSON QueryParameterValueStructValues where
3311+ toJSON = toJSON . _qpvsvAddtional
3312+
3313+-- | [Experimental] The labels associated with this dataset. You can use
3314+-- these to organize and group your datasets. You can set this property
3315+-- when inserting or updating a dataset. See Labeling Datasets for more
3316+-- information.
3317+--
3318+-- /See:/ 'dataSetLabels' smart constructor.
3319+newtype DataSetLabels = DataSetLabels'
3320+ { _dslAddtional :: HashMap Text Text
3321+ } deriving (Eq,Show,Data,Typeable,Generic)
3322+
3323+-- | Creates a value of 'DataSetLabels' with the minimum fields required to make a request.
3324+--
3325+-- Use one of the following lenses to modify other fields as desired:
3326+--
3327+-- * 'dslAddtional'
3328+dataSetLabels
3329+ :: HashMap Text Text -- ^ 'dslAddtional'
3330+ -> DataSetLabels
3331+dataSetLabels pDslAddtional_ =
3332+ DataSetLabels'
3333+ { _dslAddtional = _Coerce # pDslAddtional_
3334+ }
3335+
3336+dslAddtional :: Lens' DataSetLabels (HashMap Text Text)
3337+dslAddtional
3338+ = lens _dslAddtional (\ s a -> s{_dslAddtional = a})
3339+ . _Coerce
3340+
3341+instance FromJSON DataSetLabels where
3342+ parseJSON
3343+ = withObject "DataSetLabels"
3344+ (\ o -> DataSetLabels' <$> (parseJSONObject o))
3345+
3346+instance ToJSON DataSetLabels where
3347+ toJSON = toJSON . _dslAddtional
3348+
3010--
3349--
3011-- /See:/ 'jobConfiguration' smart constructor.
3350-- /See:/ 'jobConfiguration' smart constructor.
3012data JobConfiguration = JobConfiguration'
3351data JobConfiguration = JobConfiguration'
@@ -3014,6 +3353,7 @@ data JobConfiguration = JobConfiguration'
3014 , _jcLoad :: !(Maybe JobConfigurationLoad)
3353 , _jcLoad :: !(Maybe JobConfigurationLoad)
3015 , _jcQuery :: !(Maybe JobConfigurationQuery)
3354 , _jcQuery :: !(Maybe JobConfigurationQuery)
3016 , _jcExtract :: !(Maybe JobConfigurationExtract)
3355 , _jcExtract :: !(Maybe JobConfigurationExtract)
3356+ , _jcLabels :: !(Maybe JobConfigurationLabels)
3017 , _jcDryRun :: !(Maybe Bool)
3357 , _jcDryRun :: !(Maybe Bool)
3018 } deriving (Eq,Show,Data,Typeable,Generic)
3358 } deriving (Eq,Show,Data,Typeable,Generic)
3019
3359
@@ -3029,6 +3369,8 @@ data JobConfiguration = JobConfiguration'
3029--
3369--
3030-- * 'jcExtract'
3370-- * 'jcExtract'
3031--
3371--
3372+-- * 'jcLabels'
3373+--
3032-- * 'jcDryRun'
3374-- * 'jcDryRun'
3033jobConfiguration
3375jobConfiguration
3034 :: JobConfiguration
3376 :: JobConfiguration
@@ -3038,6 +3380,7 @@ jobConfiguration =
3038 , _jcLoad = Nothing
3380 , _jcLoad = Nothing
3039 , _jcQuery = Nothing
3381 , _jcQuery = Nothing
3040 , _jcExtract = Nothing
3382 , _jcExtract = Nothing
3383+ , _jcLabels = Nothing
3041 , _jcDryRun = Nothing
3384 , _jcDryRun = Nothing
3042 }
3385 }
3043
3386
@@ -3058,6 +3401,16 @@ jcExtract :: Lens' JobConfiguration (Maybe JobConfigurationExtract)
3058jcExtract
3401jcExtract
3059 = lens _jcExtract (\ s a -> s{_jcExtract = a})
3402 = lens _jcExtract (\ s a -> s{_jcExtract = a})
3060
3403
3404+-- | [Experimental] The labels associated with this job. You can use these to
3405+-- organize and group your jobs. Label keys and values can be no longer
3406+-- than 63 characters, can only contain letters, numeric characters,
3407+-- underscores and dashes. International characters are allowed. Label
3408+-- values are optional. Label keys must start with a letter and must be
3409+-- unique within a dataset. Both keys and values are additionally
3410+-- constrained to be \<= 128 bytes in size.
3411+jcLabels :: Lens' JobConfiguration (Maybe JobConfigurationLabels)
3412+jcLabels = lens _jcLabels (\ s a -> s{_jcLabels = a})
3413+
3061-- | [Optional] If set, don\'t actually run this job. A valid query will
3414-- | [Optional] If set, don\'t actually run this job. A valid query will
3062-- return a mostly empty response with some processing statistics, while an
3415-- return a mostly empty response with some processing statistics, while an
3063-- invalid query will return the same error it would if it wasn\'t a dry
3416-- invalid query will return the same error it would if it wasn\'t a dry
@@ -3072,6 +3425,7 @@ instance FromJSON JobConfiguration where
3072 JobConfiguration' <$>
3425 JobConfiguration' <$>
3073 (o .:? "copy") <*> (o .:? "load") <*> (o .:? "query")
3426 (o .:? "copy") <*> (o .:? "load") <*> (o .:? "query")
3074 <*> (o .:? "extract")
3427 <*> (o .:? "extract")
3428+ <*> (o .:? "labels")
3075 <*> (o .:? "dryRun"))
3429 <*> (o .:? "dryRun"))
3076
3430
3077instance ToJSON JobConfiguration where
3431instance ToJSON JobConfiguration where
@@ -3081,6 +3435,7 @@ instance ToJSON JobConfiguration where
3081 [("copy" .=) <$> _jcCopy, ("load" .=) <$> _jcLoad,
3435 [("copy" .=) <$> _jcCopy, ("load" .=) <$> _jcLoad,
3082 ("query" .=) <$> _jcQuery,
3436 ("query" .=) <$> _jcQuery,
3083 ("extract" .=) <$> _jcExtract,
3437 ("extract" .=) <$> _jcExtract,
3438+ ("labels" .=) <$> _jcLabels,
3084 ("dryRun" .=) <$> _jcDryRun])
3439 ("dryRun" .=) <$> _jcDryRun])
3085
3440
3086--
3441--
@@ -3463,12 +3818,16 @@ data JobConfigurationQuery = JobConfigurationQuery'
3463 , _jcqUseQueryCache :: !Bool
3818 , _jcqUseQueryCache :: !Bool
3464 , _jcqPreserveNulls :: !(Maybe Bool)
3819 , _jcqPreserveNulls :: !(Maybe Bool)
3465 , _jcqTableDefinitions :: !(Maybe JobConfigurationQueryTableDefinitions)
3820 , _jcqTableDefinitions :: !(Maybe JobConfigurationQueryTableDefinitions)
3821+ , _jcqQueryParameters :: !(Maybe [QueryParameter])
3822+ , _jcqSchemaUpdateOptions :: !(Maybe [Text])
3823+ , _jcqMaximumBytesBilled :: !(Maybe (Textual Int64))
3466 , _jcqCreateDisPosition :: !(Maybe Text)
3824 , _jcqCreateDisPosition :: !(Maybe Text)
3467 , _jcqUserDefinedFunctionResources :: !(Maybe [UserDefinedFunctionResource])
3825 , _jcqUserDefinedFunctionResources :: !(Maybe [UserDefinedFunctionResource])
3468 , _jcqAllowLargeResults :: !(Maybe Bool)
3826 , _jcqAllowLargeResults :: !(Maybe Bool)
3469 , _jcqMaximumBillingTier :: !(Textual Int32)
3827 , _jcqMaximumBillingTier :: !(Textual Int32)
3470 , _jcqQuery :: !(Maybe Text)
3828 , _jcqQuery :: !(Maybe Text)
3471 , _jcqFlattenResults :: !Bool
3829 , _jcqFlattenResults :: !Bool
3830+ , _jcqParameterMode :: !(Maybe Text)
3472 , _jcqUseLegacySQL :: !(Maybe Bool)
3831 , _jcqUseLegacySQL :: !(Maybe Bool)
3473 , _jcqDefaultDataSet :: !(Maybe DataSetReference)
3832 , _jcqDefaultDataSet :: !(Maybe DataSetReference)
3474 } deriving (Eq,Show,Data,Typeable,Generic)
3833 } deriving (Eq,Show,Data,Typeable,Generic)
@@ -3489,6 +3848,12 @@ data JobConfigurationQuery = JobConfigurationQuery'
3489--
3848--
3490-- * 'jcqTableDefinitions'
3849-- * 'jcqTableDefinitions'
3491--
3850--
3851+-- * 'jcqQueryParameters'
3852+--
3853+-- * 'jcqSchemaUpdateOptions'
3854+--
3855+-- * 'jcqMaximumBytesBilled'
3856+--
3492-- * 'jcqCreateDisPosition'
3857-- * 'jcqCreateDisPosition'
3493--
3858--
3494-- * 'jcqUserDefinedFunctionResources'
3859-- * 'jcqUserDefinedFunctionResources'
@@ -3501,6 +3866,8 @@ data JobConfigurationQuery = JobConfigurationQuery'
3501--
3866--
3502-- * 'jcqFlattenResults'
3867-- * 'jcqFlattenResults'
3503--
3868--
3869+-- * 'jcqParameterMode'
3870+--
3504-- * 'jcqUseLegacySQL'
3871-- * 'jcqUseLegacySQL'
3505--
3872--
3506-- * 'jcqDefaultDataSet'
3873-- * 'jcqDefaultDataSet'
@@ -3514,12 +3881,16 @@ jobConfigurationQuery =
3514 , _jcqUseQueryCache = True
3881 , _jcqUseQueryCache = True
3515 , _jcqPreserveNulls = Nothing
3882 , _jcqPreserveNulls = Nothing
3516 , _jcqTableDefinitions = Nothing
3883 , _jcqTableDefinitions = Nothing
3884+ , _jcqQueryParameters = Nothing
3885+ , _jcqSchemaUpdateOptions = Nothing
3886+ , _jcqMaximumBytesBilled = Nothing
3517 , _jcqCreateDisPosition = Nothing
3887 , _jcqCreateDisPosition = Nothing
3518 , _jcqUserDefinedFunctionResources = Nothing
3888 , _jcqUserDefinedFunctionResources = Nothing
3519 , _jcqAllowLargeResults = Nothing
3889 , _jcqAllowLargeResults = Nothing
3520 , _jcqMaximumBillingTier = 1
3890 , _jcqMaximumBillingTier = 1
3521 , _jcqQuery = Nothing
3891 , _jcqQuery = Nothing
3522 , _jcqFlattenResults = True
3892 , _jcqFlattenResults = True
3893+ , _jcqParameterMode = Nothing
3523 , _jcqUseLegacySQL = Nothing
3894 , _jcqUseLegacySQL = Nothing
3524 , _jcqDefaultDataSet = Nothing
3895 , _jcqDefaultDataSet = Nothing
3525 }
3896 }
@@ -3576,6 +3947,39 @@ jcqTableDefinitions
3576 = lens _jcqTableDefinitions
3947 = lens _jcqTableDefinitions
3577 (\ s a -> s{_jcqTableDefinitions = a})
3948 (\ s a -> s{_jcqTableDefinitions = a})
3578
3949
3950+-- | Query parameters for standard SQL queries.
3951+jcqQueryParameters :: Lens' JobConfigurationQuery [QueryParameter]
3952+jcqQueryParameters
3953+ = lens _jcqQueryParameters
3954+ (\ s a -> s{_jcqQueryParameters = a})
3955+ . _Default
3956+ . _Coerce
3957+
3958+-- | [Experimental] Allows the schema of the destination table to be updated
3959+-- as a side effect of the query job. Schema update options are supported
3960+-- in two cases: when writeDisposition is WRITE_APPEND; when
3961+-- writeDisposition is WRITE_TRUNCATE and the destination table is a
3962+-- partition of a table, specified by partition decorators. For normal
3963+-- tables, WRITE_TRUNCATE will always overwrite the schema. One or more of
3964+-- the following values are specified: ALLOW_FIELD_ADDITION: allow adding a
3965+-- nullable field to the schema. ALLOW_FIELD_RELAXATION: allow relaxing a
3966+-- required field in the original schema to nullable.
3967+jcqSchemaUpdateOptions :: Lens' JobConfigurationQuery [Text]
3968+jcqSchemaUpdateOptions
3969+ = lens _jcqSchemaUpdateOptions
3970+ (\ s a -> s{_jcqSchemaUpdateOptions = a})
3971+ . _Default
3972+ . _Coerce
3973+
3974+-- | [Optional] Limits the bytes billed for this job. Queries that will have
3975+-- bytes billed beyond this limit will fail (without incurring a charge).
3976+-- If unspecified, this will be set to your project default.
3977+jcqMaximumBytesBilled :: Lens' JobConfigurationQuery (Maybe Int64)
3978+jcqMaximumBytesBilled
3979+ = lens _jcqMaximumBytesBilled
3980+ (\ s a -> s{_jcqMaximumBytesBilled = a})
3981+ . mapping _Coerce
3982+
3579-- | [Optional] Specifies whether the job is allowed to create new tables.
3983-- | [Optional] Specifies whether the job is allowed to create new tables.
3580-- The following values are supported: CREATE_IF_NEEDED: If the table does
3984-- The following values are supported: CREATE_IF_NEEDED: If the table does
3581-- not exist, BigQuery creates the table. CREATE_NEVER: The table must
3985-- not exist, BigQuery creates the table. CREATE_NEVER: The table must
@@ -3624,6 +4028,13 @@ jcqFlattenResults
3624 = lens _jcqFlattenResults
4028 = lens _jcqFlattenResults
3625 (\ s a -> s{_jcqFlattenResults = a})
4029 (\ s a -> s{_jcqFlattenResults = a})
3626
4030
4031+-- | [Experimental] Standard SQL only. Whether to use positional (?) or named
4032+-- (\'myparam) query parameters in this query.
4033+jcqParameterMode :: Lens' JobConfigurationQuery (Maybe Text)
4034+jcqParameterMode
4035+ = lens _jcqParameterMode
4036+ (\ s a -> s{_jcqParameterMode = a})
4037+
3627-- | [Experimental] Specifies whether to use BigQuery\'s legacy SQL dialect
4038-- | [Experimental] Specifies whether to use BigQuery\'s legacy SQL dialect
3628-- for this query. The default value is true. If set to false, the query
4039-- for this query. The default value is true. If set to false, the query
3629-- will use BigQuery\'s standard SQL:
4040-- will use BigQuery\'s standard SQL:
@@ -3654,12 +4065,16 @@ instance FromJSON JobConfigurationQuery where
3654 <*> (o .:? "useQueryCache" .!= True)
4065 <*> (o .:? "useQueryCache" .!= True)
3655 <*> (o .:? "preserveNulls")
4066 <*> (o .:? "preserveNulls")
3656 <*> (o .:? "tableDefinitions")
4067 <*> (o .:? "tableDefinitions")
4068+ <*> (o .:? "queryParameters" .!= mempty)
4069+ <*> (o .:? "schemaUpdateOptions" .!= mempty)
4070+ <*> (o .:? "maximumBytesBilled")
3657 <*> (o .:? "createDisposition")
4071 <*> (o .:? "createDisposition")
3658 <*> (o .:? "userDefinedFunctionResources" .!= mempty)
4072 <*> (o .:? "userDefinedFunctionResources" .!= mempty)
3659 <*> (o .:? "allowLargeResults")
4073 <*> (o .:? "allowLargeResults")
3660 <*> (o .:? "maximumBillingTier" .!= 1)
4074 <*> (o .:? "maximumBillingTier" .!= 1)
3661 <*> (o .:? "query")
4075 <*> (o .:? "query")
3662 <*> (o .:? "flattenResults" .!= True)
4076 <*> (o .:? "flattenResults" .!= True)
4077+ <*> (o .:? "parameterMode")
3663 <*> (o .:? "useLegacySql")
4078 <*> (o .:? "useLegacySql")
3664 <*> (o .:? "defaultDataset"))
4079 <*> (o .:? "defaultDataset"))
3665
4080
@@ -3673,6 +4088,10 @@ instance ToJSON JobConfigurationQuery where
3673 Just ("useQueryCache" .= _jcqUseQueryCache),
4088 Just ("useQueryCache" .= _jcqUseQueryCache),
3674 ("preserveNulls" .=) <$> _jcqPreserveNulls,
4089 ("preserveNulls" .=) <$> _jcqPreserveNulls,
3675 ("tableDefinitions" .=) <$> _jcqTableDefinitions,
4090 ("tableDefinitions" .=) <$> _jcqTableDefinitions,
4091+ ("queryParameters" .=) <$> _jcqQueryParameters,
4092+ ("schemaUpdateOptions" .=) <$>
4093+ _jcqSchemaUpdateOptions,
4094+ ("maximumBytesBilled" .=) <$> _jcqMaximumBytesBilled,
3676 ("createDisposition" .=) <$> _jcqCreateDisPosition,
4095 ("createDisposition" .=) <$> _jcqCreateDisPosition,
3677 ("userDefinedFunctionResources" .=) <$>
4096 ("userDefinedFunctionResources" .=) <$>
3678 _jcqUserDefinedFunctionResources,
4097 _jcqUserDefinedFunctionResources,
@@ -3681,6 +4100,7 @@ instance ToJSON JobConfigurationQuery where
3681 ("maximumBillingTier" .= _jcqMaximumBillingTier),
4100 ("maximumBillingTier" .= _jcqMaximumBillingTier),
3682 ("query" .=) <$> _jcqQuery,
4101 ("query" .=) <$> _jcqQuery,
3683 Just ("flattenResults" .= _jcqFlattenResults),
4102 Just ("flattenResults" .= _jcqFlattenResults),
4103+ ("parameterMode" .=) <$> _jcqParameterMode,
3684 ("useLegacySql" .=) <$> _jcqUseLegacySQL,
4104 ("useLegacySql" .=) <$> _jcqUseLegacySQL,
3685 ("defaultDataset" .=) <$> _jcqDefaultDataSet])
4105 ("defaultDataset" .=) <$> _jcqDefaultDataSet])
3686
4106
@@ -3920,11 +4340,73 @@ instance ToJSON TableCell where
3920 toJSON TableCell'{..}
4340 toJSON TableCell'{..}
3921 = object (catMaybes [("v" .=) <$> _tcV])
4341 = object (catMaybes [("v" .=) <$> _tcV])
3922
4342
4343+--
4344+-- /See:/ 'queryParameterValue' smart constructor.
4345+data QueryParameterValue = QueryParameterValue'
4346+ { _qpvStructValues :: !(Maybe QueryParameterValueStructValues)
4347+ , _qpvValue :: !(Maybe Text)
4348+ , _qpvArrayValues :: !(Maybe [QueryParameterValue])
4349+ } deriving (Eq,Show,Data,Typeable,Generic)
4350+
4351+-- | Creates a value of 'QueryParameterValue' with the minimum fields required to make a request.
4352+--
4353+-- Use one of the following lenses to modify other fields as desired:
4354+--
4355+-- * 'qpvStructValues'
4356+--
4357+-- * 'qpvValue'
4358+--
4359+-- * 'qpvArrayValues'
4360+queryParameterValue
4361+ :: QueryParameterValue
4362+queryParameterValue =
4363+ QueryParameterValue'
4364+ { _qpvStructValues = Nothing
4365+ , _qpvValue = Nothing
4366+ , _qpvArrayValues = Nothing
4367+ }
4368+
4369+-- | [Optional] The struct field values, in order of the struct type\'s
4370+-- declaration.
4371+qpvStructValues :: Lens' QueryParameterValue (Maybe QueryParameterValueStructValues)
4372+qpvStructValues
4373+ = lens _qpvStructValues
4374+ (\ s a -> s{_qpvStructValues = a})
4375+
4376+-- | [Optional] The value of this value, if a simple scalar type.
4377+qpvValue :: Lens' QueryParameterValue (Maybe Text)
4378+qpvValue = lens _qpvValue (\ s a -> s{_qpvValue = a})
4379+
4380+-- | [Optional] The array values, if this is an array type.
4381+qpvArrayValues :: Lens' QueryParameterValue [QueryParameterValue]
4382+qpvArrayValues
4383+ = lens _qpvArrayValues
4384+ (\ s a -> s{_qpvArrayValues = a})
4385+ . _Default
4386+ . _Coerce
4387+
4388+instance FromJSON QueryParameterValue where
4389+ parseJSON
4390+ = withObject "QueryParameterValue"
4391+ (\ o ->
4392+ QueryParameterValue' <$>
4393+ (o .:? "structValues") <*> (o .:? "value") <*>
4394+ (o .:? "arrayValues" .!= mempty))
4395+
4396+instance ToJSON QueryParameterValue where
4397+ toJSON QueryParameterValue'{..}
4398+ = object
4399+ (catMaybes
4400+ [("structValues" .=) <$> _qpvStructValues,
4401+ ("value" .=) <$> _qpvValue,
4402+ ("arrayValues" .=) <$> _qpvArrayValues])
4403+
3923--
4404--
3924-- /See:/ 'viewDefinition' smart constructor.
4405-- /See:/ 'viewDefinition' smart constructor.
3925data ViewDefinition = ViewDefinition'
4406data ViewDefinition = ViewDefinition'
3926 { _vdUserDefinedFunctionResources :: !(Maybe [UserDefinedFunctionResource])
4407 { _vdUserDefinedFunctionResources :: !(Maybe [UserDefinedFunctionResource])
3927 , _vdQuery :: !(Maybe Text)
4408 , _vdQuery :: !(Maybe Text)
4409+ , _vdUseLegacySQL :: !(Maybe Bool)
3928 } deriving (Eq,Show,Data,Typeable,Generic)
4410 } deriving (Eq,Show,Data,Typeable,Generic)
3929
4411
3930-- | Creates a value of 'ViewDefinition' with the minimum fields required to make a request.
4412-- | Creates a value of 'ViewDefinition' with the minimum fields required to make a request.
@@ -3934,12 +4416,15 @@ data ViewDefinition = ViewDefinition'
3934-- * 'vdUserDefinedFunctionResources'
4416-- * 'vdUserDefinedFunctionResources'
3935--
4417--
3936-- * 'vdQuery'
4418-- * 'vdQuery'
4419+--
4420+-- * 'vdUseLegacySQL'
3937viewDefinition
4421viewDefinition
3938 :: ViewDefinition
4422 :: ViewDefinition
3939viewDefinition =
4423viewDefinition =
3940 ViewDefinition'
4424 ViewDefinition'
3941 { _vdUserDefinedFunctionResources = Nothing
4425 { _vdUserDefinedFunctionResources = Nothing
3942 , _vdQuery = Nothing
4426 , _vdQuery = Nothing
4427+ , _vdUseLegacySQL = Nothing
3943 }
4428 }
3944
4429
3945-- | [Experimental] Describes user-defined function resources used in the
4430-- | [Experimental] Describes user-defined function resources used in the
@@ -3955,13 +4440,24 @@ vdUserDefinedFunctionResources
3955vdQuery :: Lens' ViewDefinition (Maybe Text)
4440vdQuery :: Lens' ViewDefinition (Maybe Text)
3956vdQuery = lens _vdQuery (\ s a -> s{_vdQuery = a})
4441vdQuery = lens _vdQuery (\ s a -> s{_vdQuery = a})
3957
4442
4443+-- | [Experimental] Specifies whether to use BigQuery\'s legacy SQL for this
4444+-- view. The default value is true. If set to false, the view will use
4445+-- BigQuery\'s standard SQL:
4446+-- https:\/\/cloud.google.com\/bigquery\/sql-reference\/ Queries and views
4447+-- that reference this view must use the same flag value.
4448+vdUseLegacySQL :: Lens' ViewDefinition (Maybe Bool)
4449+vdUseLegacySQL
4450+ = lens _vdUseLegacySQL
4451+ (\ s a -> s{_vdUseLegacySQL = a})
4452+
3958instance FromJSON ViewDefinition where
4453instance FromJSON ViewDefinition where
3959 parseJSON
4454 parseJSON
3960 = withObject "ViewDefinition"
4455 = withObject "ViewDefinition"
3961 (\ o ->
4456 (\ o ->
3962 ViewDefinition' <$>
4457 ViewDefinition' <$>
3963 (o .:? "userDefinedFunctionResources" .!= mempty) <*>
4458 (o .:? "userDefinedFunctionResources" .!= mempty) <*>
3964− (o .:? "query"))
4459+ (o .:? "query")
4460+ <*> (o .:? "useLegacySql"))
3965
4461
3966instance ToJSON ViewDefinition where
4462instance ToJSON ViewDefinition where
3967 toJSON ViewDefinition'{..}
4463 toJSON ViewDefinition'{..}
@@ -3969,7 +4465,8 @@ instance ToJSON ViewDefinition where
3969 (catMaybes
4465 (catMaybes
3970 [("userDefinedFunctionResources" .=) <$>
4466 [("userDefinedFunctionResources" .=) <$>
3971 _vdUserDefinedFunctionResources,
4467 _vdUserDefinedFunctionResources,
3972− ("query" .=) <$> _vdQuery])
4468+ ("query" .=) <$> _vdQuery,
4469+ ("useLegacySql" .=) <$> _vdUseLegacySQL])
3973
4470
3974--
4471--
3975-- /See:/ 'userDefinedFunctionResource' smart constructor.
4472-- /See:/ 'userDefinedFunctionResource' smart constructor.
@@ -4025,13 +4522,15 @@ instance ToJSON UserDefinedFunctionResource where
4025--
4522--
4026-- /See:/ 'jobStatistics2' smart constructor.
4523-- /See:/ 'jobStatistics2' smart constructor.
4027data JobStatistics2 = JobStatistics2'
4524data JobStatistics2 = JobStatistics2'
4028− { _jSchema :: !(Maybe TableSchema)
4525+ { _jSchema :: !(Maybe TableSchema)
4029− , _jTotalBytesProcessed :: !(Maybe (Textual Int64))
4526+ , _jTotalBytesProcessed :: !(Maybe (Textual Int64))
4030− , _jBillingTier :: !(Maybe (Textual Int32))
4527+ , _jBillingTier :: !(Maybe (Textual Int32))
4528+ , _jUndeclaredQueryParameters :: !(Maybe [QueryParameter])
4031− , _jReferencedTables :: !(Maybe [TableReference])
4529+ , _jReferencedTables :: !(Maybe [TableReference])
4530+ , _jNumDmlAffectedRows :: !(Maybe (Textual Int64))
4032− , _jQueryPlan :: !(Maybe [ExplainQueryStage])
4531+ , _jQueryPlan :: !(Maybe [ExplainQueryStage])
4033− , _jCacheHit :: !(Maybe Bool)
4532+ , _jCacheHit :: !(Maybe Bool)
4034− , _jTotalBytesBilled :: !(Maybe (Textual Int64))
4533+ , _jTotalBytesBilled :: !(Maybe (Textual Int64))
4035 } deriving (Eq,Show,Data,Typeable,Generic)
4534 } deriving (Eq,Show,Data,Typeable,Generic)
4036
4535
4037-- | Creates a value of 'JobStatistics2' with the minimum fields required to make a request.
4536-- | Creates a value of 'JobStatistics2' with the minimum fields required to make a request.
@@ -4044,8 +4543,12 @@ data JobStatistics2 = JobStatistics2'
4044--
4543--
4045-- * 'jBillingTier'
4544-- * 'jBillingTier'
4046--
4545--
4546+-- * 'jUndeclaredQueryParameters'
4547+--
4047-- * 'jReferencedTables'
4548-- * 'jReferencedTables'
4048--
4549--
4550+-- * 'jNumDmlAffectedRows'
4551+--
4049-- * 'jQueryPlan'
4552-- * 'jQueryPlan'
4050--
4553--
4051-- * 'jCacheHit'
4554-- * 'jCacheHit'
@@ -4058,7 +4561,9 @@ jobStatistics2 =
4058 { _jSchema = Nothing
4561 { _jSchema = Nothing
4059 , _jTotalBytesProcessed = Nothing
4562 , _jTotalBytesProcessed = Nothing
4060 , _jBillingTier = Nothing
4563 , _jBillingTier = Nothing
4564+ , _jUndeclaredQueryParameters = Nothing
4061 , _jReferencedTables = Nothing
4565 , _jReferencedTables = Nothing
4566+ , _jNumDmlAffectedRows = Nothing
4062 , _jQueryPlan = Nothing
4567 , _jQueryPlan = Nothing
4063 , _jCacheHit = Nothing
4568 , _jCacheHit = Nothing
4064 , _jTotalBytesBilled = Nothing
4569 , _jTotalBytesBilled = Nothing
@@ -4082,6 +4587,15 @@ jBillingTier
4082 = lens _jBillingTier (\ s a -> s{_jBillingTier = a})
4587 = lens _jBillingTier (\ s a -> s{_jBillingTier = a})
4083 . mapping _Coerce
4588 . mapping _Coerce
4084
4589
4590+-- | [Output-only, Experimental] Standard SQL only: list of undeclared query
4591+-- parameters detected during a dry run validation.
4592+jUndeclaredQueryParameters :: Lens' JobStatistics2 [QueryParameter]
4593+jUndeclaredQueryParameters
4594+ = lens _jUndeclaredQueryParameters
4595+ (\ s a -> s{_jUndeclaredQueryParameters = a})
4596+ . _Default
4597+ . _Coerce
4598+
4085-- | [Output-only, Experimental] Referenced tables for the job. Queries that
4599-- | [Output-only, Experimental] Referenced tables for the job. Queries that
4086-- reference more than 50 tables will not have a complete list.
4600-- reference more than 50 tables will not have a complete list.
4087jReferencedTables :: Lens' JobStatistics2 [TableReference]
4601jReferencedTables :: Lens' JobStatistics2 [TableReference]
@@ -4091,8 +4605,15 @@ jReferencedTables
4091 . _Default
4605 . _Default
4092 . _Coerce
4606 . _Coerce
4093
4607
4608+-- | [Output-only, Experimental] The number of rows affected by a DML
4609+-- statement. Present only for DML statements INSERT, UPDATE or DELETE.
4610+jNumDmlAffectedRows :: Lens' JobStatistics2 (Maybe Int64)
4611+jNumDmlAffectedRows
4612+ = lens _jNumDmlAffectedRows
4613+ (\ s a -> s{_jNumDmlAffectedRows = a})
4614+ . mapping _Coerce
4615+
4094−-- | [Output-only, Experimental] Describes execution plan for the query as a
4616+-- | [Output-only, Experimental] Describes execution plan for the query.
4095−-- list of stages.
4096jQueryPlan :: Lens' JobStatistics2 [ExplainQueryStage]
4617jQueryPlan :: Lens' JobStatistics2 [ExplainQueryStage]
4097jQueryPlan
4618jQueryPlan
4098 = lens _jQueryPlan (\ s a -> s{_jQueryPlan = a}) .
4619 = lens _jQueryPlan (\ s a -> s{_jQueryPlan = a}) .
@@ -4118,7 +4639,9 @@ instance FromJSON JobStatistics2 where
4118 JobStatistics2' <$>
4639 JobStatistics2' <$>
4119 (o .:? "schema") <*> (o .:? "totalBytesProcessed")
4640 (o .:? "schema") <*> (o .:? "totalBytesProcessed")
4120 <*> (o .:? "billingTier")
4641 <*> (o .:? "billingTier")
4642+ <*> (o .:? "undeclaredQueryParameters" .!= mempty)
4121 <*> (o .:? "referencedTables" .!= mempty)
4643 <*> (o .:? "referencedTables" .!= mempty)
4644+ <*> (o .:? "numDmlAffectedRows")
4122 <*> (o .:? "queryPlan" .!= mempty)
4645 <*> (o .:? "queryPlan" .!= mempty)
4123 <*> (o .:? "cacheHit")
4646 <*> (o .:? "cacheHit")
4124 <*> (o .:? "totalBytesBilled"))
4647 <*> (o .:? "totalBytesBilled"))
@@ -4130,7 +4653,10 @@ instance ToJSON JobStatistics2 where
4130 [("schema" .=) <$> _jSchema,
4653 [("schema" .=) <$> _jSchema,
4131 ("totalBytesProcessed" .=) <$> _jTotalBytesProcessed,
4654 ("totalBytesProcessed" .=) <$> _jTotalBytesProcessed,
4132 ("billingTier" .=) <$> _jBillingTier,
4655 ("billingTier" .=) <$> _jBillingTier,
4656+ ("undeclaredQueryParameters" .=) <$>
4657+ _jUndeclaredQueryParameters,
4133 ("referencedTables" .=) <$> _jReferencedTables,
4658 ("referencedTables" .=) <$> _jReferencedTables,
4659+ ("numDmlAffectedRows" .=) <$> _jNumDmlAffectedRows,
4134 ("queryPlan" .=) <$> _jQueryPlan,
4660 ("queryPlan" .=) <$> _jQueryPlan,
4135 ("cacheHit" .=) <$> _jCacheHit,
4661 ("cacheHit" .=) <$> _jCacheHit,
4136 ("totalBytesBilled" .=) <$> _jTotalBytesBilled])
4662 ("totalBytesBilled" .=) <$> _jTotalBytesBilled])
@@ -4349,6 +4875,66 @@ instance ToJSON TableDataInsertAllResponse where
4349 [Just ("kind" .= _tKind),
4875 [Just ("kind" .= _tKind),
4350 ("insertErrors" .=) <$> _tInsertErrors])
4876 ("insertErrors" .=) <$> _tInsertErrors])
4351
4877
4878+--
4879+-- /See:/ 'queryParameterType' smart constructor.
4880+data QueryParameterType = QueryParameterType'
4881+ { _qptStructTypes :: !(Maybe [QueryParameterTypeStructTypesItem])
4882+ , _qptType :: !(Maybe Text)
4883+ , _qptArrayType :: !(Maybe QueryParameterType)
4884+ } deriving (Eq,Show,Data,Typeable,Generic)
4885+
4886+-- | Creates a value of 'QueryParameterType' with the minimum fields required to make a request.
4887+--
4888+-- Use one of the following lenses to modify other fields as desired:
4889+--
4890+-- * 'qptStructTypes'
4891+--
4892+-- * 'qptType'
4893+--
4894+-- * 'qptArrayType'
4895+queryParameterType
4896+ :: QueryParameterType
4897+queryParameterType =
4898+ QueryParameterType'
4899+ { _qptStructTypes = Nothing
4900+ , _qptType = Nothing
4901+ , _qptArrayType = Nothing
4902+ }
4903+
4904+-- | [Optional] The types of the fields of this struct, in order, if this is
4905+-- a struct.
4906+qptStructTypes :: Lens' QueryParameterType [QueryParameterTypeStructTypesItem]
4907+qptStructTypes
4908+ = lens _qptStructTypes
4909+ (\ s a -> s{_qptStructTypes = a})
4910+ . _Default
4911+ . _Coerce
4912+
4913+-- | [Required] The top level type of this field.
4914+qptType :: Lens' QueryParameterType (Maybe Text)
4915+qptType = lens _qptType (\ s a -> s{_qptType = a})
4916+
4917+-- | [Optional] The type of the array\'s elements, if this is an array.
4918+qptArrayType :: Lens' QueryParameterType (Maybe QueryParameterType)
4919+qptArrayType
4920+ = lens _qptArrayType (\ s a -> s{_qptArrayType = a})
4921+
4922+instance FromJSON QueryParameterType where
4923+ parseJSON
4924+ = withObject "QueryParameterType"
4925+ (\ o ->
4926+ QueryParameterType' <$>
4927+ (o .:? "structTypes" .!= mempty) <*> (o .:? "type")
4928+ <*> (o .:? "arrayType"))
4929+
4930+instance ToJSON QueryParameterType where
4931+ toJSON QueryParameterType'{..}
4932+ = object
4933+ (catMaybes
4934+ [("structTypes" .=) <$> _qptStructTypes,
4935+ ("type" .=) <$> _qptType,
4936+ ("arrayType" .=) <$> _qptArrayType])
4937+
4352--
4938--
4353-- /See:/ 'table' smart constructor.
4939-- /See:/ 'table' smart constructor.
4354data Table = Table'
4940data Table = Table'
@@ -4890,6 +5476,7 @@ data QueryResponse = QueryResponse'
4890 , _qTotalBytesProcessed :: !(Maybe (Textual Int64))
5476 , _qTotalBytesProcessed :: !(Maybe (Textual Int64))
4891 , _qRows :: !(Maybe [TableRow])
5477 , _qRows :: !(Maybe [TableRow])
4892 , _qPageToken :: !(Maybe Text)
5478 , _qPageToken :: !(Maybe Text)
5479+ , _qNumDmlAffectedRows :: !(Maybe (Textual Int64))
4893 , _qTotalRows :: !(Maybe (Textual Word64))
5480 , _qTotalRows :: !(Maybe (Textual Word64))
4894 , _qErrors :: !(Maybe [ErrorProto])
5481 , _qErrors :: !(Maybe [ErrorProto])
4895 , _qJobComplete :: !(Maybe Bool)
5482 , _qJobComplete :: !(Maybe Bool)
@@ -4912,6 +5499,8 @@ data QueryResponse = QueryResponse'
4912--
5499--
4913-- * 'qPageToken'
5500-- * 'qPageToken'
4914--
5501--
5502+-- * 'qNumDmlAffectedRows'
5503+--
4915-- * 'qTotalRows'
5504-- * 'qTotalRows'
4916--
5505--
4917-- * 'qErrors'
5506-- * 'qErrors'
@@ -4929,6 +5518,7 @@ queryResponse =
4929 , _qTotalBytesProcessed = Nothing
5518 , _qTotalBytesProcessed = Nothing
4930 , _qRows = Nothing
5519 , _qRows = Nothing
4931 , _qPageToken = Nothing
5520 , _qPageToken = Nothing
5521+ , _qNumDmlAffectedRows = Nothing
4932 , _qTotalRows = Nothing
5522 , _qTotalRows = Nothing
4933 , _qErrors = Nothing
5523 , _qErrors = Nothing
4934 , _qJobComplete = Nothing
5524 , _qJobComplete = Nothing
@@ -4977,6 +5567,14 @@ qPageToken :: Lens' QueryResponse (Maybe Text)
4977qPageToken
5567qPageToken
4978 = lens _qPageToken (\ s a -> s{_qPageToken = a})
5568 = lens _qPageToken (\ s a -> s{_qPageToken = a})
4979
5569
5570+-- | [Output-only, Experimental] The number of rows affected by a DML
5571+-- statement. Present only for DML statements INSERT, UPDATE or DELETE.
5572+qNumDmlAffectedRows :: Lens' QueryResponse (Maybe Int64)
5573+qNumDmlAffectedRows
5574+ = lens _qNumDmlAffectedRows
5575+ (\ s a -> s{_qNumDmlAffectedRows = a})
5576+ . mapping _Coerce
5577+
4980-- | The total number of rows in the complete query result set, which can be
5578-- | The total number of rows in the complete query result set, which can be
4981-- more than the number of rows in this single page of results.
5579-- more than the number of rows in this single page of results.
4982qTotalRows :: Lens' QueryResponse (Maybe Word64)
5580qTotalRows :: Lens' QueryResponse (Maybe Word64)
@@ -5015,6 +5613,7 @@ instance FromJSON QueryResponse where
5015 <*> (o .:? "totalBytesProcessed")
5613 <*> (o .:? "totalBytesProcessed")
5016 <*> (o .:? "rows" .!= mempty)
5614 <*> (o .:? "rows" .!= mempty)
5017 <*> (o .:? "pageToken")
5615 <*> (o .:? "pageToken")
5616+ <*> (o .:? "numDmlAffectedRows")
5018 <*> (o .:? "totalRows")
5617 <*> (o .:? "totalRows")
5019 <*> (o .:? "errors" .!= mempty)
5618 <*> (o .:? "errors" .!= mempty)
5020 <*> (o .:? "jobComplete")
5619 <*> (o .:? "jobComplete")
@@ -5029,7 +5628,45 @@ instance ToJSON QueryResponse where
5029 ("totalBytesProcessed" .=) <$> _qTotalBytesProcessed,
5628 ("totalBytesProcessed" .=) <$> _qTotalBytesProcessed,
5030 ("rows" .=) <$> _qRows,
5629 ("rows" .=) <$> _qRows,
5031 ("pageToken" .=) <$> _qPageToken,
5630 ("pageToken" .=) <$> _qPageToken,
5631+ ("numDmlAffectedRows" .=) <$> _qNumDmlAffectedRows,
5032 ("totalRows" .=) <$> _qTotalRows,
5632 ("totalRows" .=) <$> _qTotalRows,
5033 ("errors" .=) <$> _qErrors,
5633 ("errors" .=) <$> _qErrors,
5034 ("jobComplete" .=) <$> _qJobComplete,
5634 ("jobComplete" .=) <$> _qJobComplete,
5035 ("cacheHit" .=) <$> _qCacheHit])
5635 ("cacheHit" .=) <$> _qCacheHit])
5636+
5637+-- | [Experimental] The labels associated with this dataset. You can use
5638+-- these to organize and group your datasets.
5639+--
5640+-- /See:/ 'dataSetListDataSetsItemLabels' smart constructor.
5641+newtype DataSetListDataSetsItemLabels = DataSetListDataSetsItemLabels'
5642+ { _dsldsilAddtional :: HashMap Text Text
5643+ } deriving (Eq,Show,Data,Typeable,Generic)
5644+
5645+-- | Creates a value of 'DataSetListDataSetsItemLabels' with the minimum fields required to make a request.
5646+--
5647+-- Use one of the following lenses to modify other fields as desired:
5648+--
5649+-- * 'dsldsilAddtional'
5650+dataSetListDataSetsItemLabels
5651+ :: HashMap Text Text -- ^ 'dsldsilAddtional'
5652+ -> DataSetListDataSetsItemLabels
5653+dataSetListDataSetsItemLabels pDsldsilAddtional_ =
5654+ DataSetListDataSetsItemLabels'
5655+ { _dsldsilAddtional = _Coerce # pDsldsilAddtional_
5656+ }
5657+
5658+dsldsilAddtional :: Lens' DataSetListDataSetsItemLabels (HashMap Text Text)
5659+dsldsilAddtional
5660+ = lens _dsldsilAddtional
5661+ (\ s a -> s{_dsldsilAddtional = a})
5662+ . _Coerce
5663+
5664+instance FromJSON DataSetListDataSetsItemLabels where
5665+ parseJSON
5666+ = withObject "DataSetListDataSetsItemLabels"
5667+ (\ o ->
5668+ DataSetListDataSetsItemLabels' <$>
5669+ (parseJSONObject o))
5670+
5671+instance ToJSON DataSetListDataSetsItemLabels where
5672+ toJSON = toJSON . _dsldsilAddtional
gogol-bigquery/gen/Network/Google/Resource/BigQuery/DataSets/List.hs+18−4
@@ -35,6 +35,7 @@ module Network.Google.Resource.BigQuery.DataSets.List
35
35
36 -- * Request Lenses
36 -- * Request Lenses
37 , dslAll
37 , dslAll
38+ , dslFilter
38 , dslPageToken
39 , dslPageToken
39 , dslProjectId
40 , dslProjectId
40 , dslMaxResults
41 , dslMaxResults
@@ -52,9 +53,10 @@ type DataSetsListResource =
52 Capture "projectId" Text :>
53 Capture "projectId" Text :>
53 "datasets" :>
54 "datasets" :>
54 QueryParam "all" Bool :>
55 QueryParam "all" Bool :>
56+ QueryParam "filter" Text :>
55− QueryParam "pageToken" Text :>
57+ QueryParam "pageToken" Text :>
56− QueryParam "maxResults" (Textual Word32) :>
58+ QueryParam "maxResults" (Textual Word32) :>
57− QueryParam "alt" AltJSON :> Get '[JSON] DataSetList
59+ QueryParam "alt" AltJSON :> Get '[JSON] DataSetList
58
60
59-- | Lists all datasets in the specified project to which you have been
61-- | Lists all datasets in the specified project to which you have been
60-- granted the READER dataset role.
62-- granted the READER dataset role.
@@ -62,6 +64,7 @@ type DataSetsListResource =
62-- /See:/ 'dataSetsList' smart constructor.
64-- /See:/ 'dataSetsList' smart constructor.
63data DataSetsList = DataSetsList'
65data DataSetsList = DataSetsList'
64 { _dslAll :: !(Maybe Bool)
66 { _dslAll :: !(Maybe Bool)
67+ , _dslFilter :: !(Maybe Text)
65 , _dslPageToken :: !(Maybe Text)
68 , _dslPageToken :: !(Maybe Text)
66 , _dslProjectId :: !Text
69 , _dslProjectId :: !Text
67 , _dslMaxResults :: !(Maybe (Textual Word32))
70 , _dslMaxResults :: !(Maybe (Textual Word32))
@@ -73,6 +76,8 @@ data DataSetsList = DataSetsList'
73--
76--
74-- * 'dslAll'
77-- * 'dslAll'
75--
78--
79+-- * 'dslFilter'
80+--
76-- * 'dslPageToken'
81-- * 'dslPageToken'
77--
82--
78-- * 'dslProjectId'
83-- * 'dslProjectId'
@@ -84,6 +89,7 @@ dataSetsList
84dataSetsList pDslProjectId_ =
89dataSetsList pDslProjectId_ =
85 DataSetsList'
90 DataSetsList'
86 { _dslAll = Nothing
91 { _dslAll = Nothing
92+ , _dslFilter = Nothing
87 , _dslPageToken = Nothing
93 , _dslPageToken = Nothing
88 , _dslProjectId = pDslProjectId_
94 , _dslProjectId = pDslProjectId_
89 , _dslMaxResults = Nothing
95 , _dslMaxResults = Nothing
@@ -93,6 +99,14 @@ dataSetsList pDslProjectId_ =
93dslAll :: Lens' DataSetsList (Maybe Bool)
99dslAll :: Lens' DataSetsList (Maybe Bool)
94dslAll = lens _dslAll (\ s a -> s{_dslAll = a})
100dslAll = lens _dslAll (\ s a -> s{_dslAll = a})
95
101
102+-- | An expression for filtering the results of the request by label. The
103+-- syntax is \"labels.[:]\". Multiple filters can be ANDed together by
104+-- connecting with a space. Example: \"labels.department:receiving
105+-- labels.active\". See Filtering datasets using labels for details.
106+dslFilter :: Lens' DataSetsList (Maybe Text)
107+dslFilter
108+ = lens _dslFilter (\ s a -> s{_dslFilter = a})
109+
96-- | Page token, returned by a previous call, to request the next page of
110-- | Page token, returned by a previous call, to request the next page of
97-- results
111-- results
98dslPageToken :: Lens' DataSetsList (Maybe Text)
112dslPageToken :: Lens' DataSetsList (Maybe Text)
@@ -118,7 +132,7 @@ instance GoogleRequest DataSetsList where
118 "https://www.googleapis.com/auth/cloud-platform",
132 "https://www.googleapis.com/auth/cloud-platform",
119 "https://www.googleapis.com/auth/cloud-platform.read-only"]
133 "https://www.googleapis.com/auth/cloud-platform.read-only"]
120 requestClient DataSetsList'{..}
134 requestClient DataSetsList'{..}
121− = go _dslProjectId _dslAll _dslPageToken
135+ = go _dslProjectId _dslAll _dslFilter _dslPageToken
122 _dslMaxResults
136 _dslMaxResults
123 (Just AltJSON)
137 (Just AltJSON)
124 bigQueryService
138 bigQueryService
gogol-bigquery/gen/Network/Google/Resource/BigQuery/Jobs/Cancel.hs+1−1
@@ -47,7 +47,7 @@ import Network.Google.Prelude
47type JobsCancelResource =
47type JobsCancelResource =
48 "bigquery" :>
48 "bigquery" :>
49 "v2" :>
49 "v2" :>
50− "project" :>
50+ "projects" :>
51 Capture "projectId" Text :>
51 Capture "projectId" Text :>
52 "jobs" :>
52 "jobs" :>
53 Capture "jobId" Text :>
53 Capture "jobId" Text :>