@@ -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)
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'
170-- * 'dsldsiId'
171-- * 'dsldsiId'
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
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})
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)
212+ = lens _dsldsiLabels (\ s a -> s{_dsldsiLabels = a})
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"))
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])
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])
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)
663+-- | Creates a value of 'QueryParameterTypeStructTypesItem' with the minimum fields required to make a request.
665+-- Use one of the following lenses to modify other fields as desired:
671+-- * 'qptstiDescription'
672+queryParameterTypeStructTypesItem
673+ :: QueryParameterTypeStructTypesItem
674+queryParameterTypeStructTypesItem =
675+ QueryParameterTypeStructTypesItem'
676+ { _qptstiName = Nothing
677+ , _qptstiType = Nothing
678+ , _qptstiDescription = Nothing
681+-- | [Optional] The name of this field.
682+qptstiName :: Lens' QueryParameterTypeStructTypesItem (Maybe Text)
684+ = lens _qptstiName (\ s a -> s{_qptstiName = a})
686+-- | [Required] The type of this field.
687+qptstiType :: Lens' QueryParameterTypeStructTypesItem (Maybe QueryParameterType)
689+ = lens _qptstiType (\ s a -> s{_qptstiType = a})
691+-- | [Optional] Human-oriented description of the field.
692+qptstiDescription :: Lens' QueryParameterTypeStructTypesItem (Maybe Text)
694+ = lens _qptstiDescription
695+ (\ s a -> s{_qptstiDescription = a})
697+instance FromJSON QueryParameterTypeStructTypesItem
700+ = withObject "QueryParameterTypeStructTypesItem"
702+ QueryParameterTypeStructTypesItem' <$>
703+ (o .:? "name") <*> (o .:? "type") <*>
704+ (o .:? "description"))
706+instance ToJSON QueryParameterTypeStructTypesItem
708+ toJSON QueryParameterTypeStructTypesItem'{..}
711+ [("name" .=) <$> _qptstiName,
712+ ("type" .=) <$> _qptstiType,
713+ ("description" .=) <$> _qptstiDescription])
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])
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.
931+-- /See:/ 'jobConfigurationLabels' smart constructor.
932+newtype JobConfigurationLabels = JobConfigurationLabels'
933+ { _jclAddtional :: HashMap Text Text
934+ } deriving (Eq,Show,Data,Typeable,Generic)
936+-- | Creates a value of 'JobConfigurationLabels' with the minimum fields required to make a request.
938+-- Use one of the following lenses to modify other fields as desired:
941+jobConfigurationLabels
942+ :: HashMap Text Text -- ^ 'jclAddtional'
943+ -> JobConfigurationLabels
944+jobConfigurationLabels pJclAddtional_ =
945+ JobConfigurationLabels'
946+ { _jclAddtional = _Coerce # pJclAddtional_
949+jclAddtional :: Lens' JobConfigurationLabels (HashMap Text Text)
951+ = lens _jclAddtional (\ s a -> s{_jclAddtional = a})
954+instance FromJSON JobConfigurationLabels where
956+ = withObject "JobConfigurationLabels"
958+ JobConfigurationLabels' <$> (parseJSONObject o))
960+instance ToJSON JobConfigurationLabels where
961+ toJSON = toJSON . _jclAddtional
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'
890-- * 'dsId'
1003-- * 'dsId'
892-- * 'dsDefaultTableExpirationMs'
1007-- * 'dsDefaultTableExpirationMs'
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
@@ -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})
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
1102+dsLabels :: Lens' DataSet (Maybe DataSetLabels)
1103+dsLabels = lens _dsLabels (\ s a -> s{_dsLabels = a})
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"))
@@ -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
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)
@@ -1046,6 +1172,8 @@ data BigtableOptions = BigtableOptions'
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:
1175+-- * 'boReadRowkeyAsString'
1049-- * 'boIgnoreUnspecifiedColumnFamilies'
1177-- * 'boIgnoreUnspecifiedColumnFamilies'
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
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})
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"
1087 BigtableOptions' <$>
1225 BigtableOptions' <$>
1226+ (o .:? "readRowkeyAsString") <*>
1088− (o .:? "ignoreUnspecifiedColumnFamilies") <*>
1227+ (o .:? "ignoreUnspecifiedColumnFamilies")
1089− (o .:? "columnFamilies" .!= mempty))
1228+ <*> (o .:? "columnFamilies" .!= mempty))
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])
@@ -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})
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})
@@ -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'
1455-- * 'gqrrPageToken'
1596-- * 'gqrrPageToken'
1598+-- * 'gqrrNumDmlAffectedRows'
1457-- * 'gqrrTotalRows'
1600-- * 'gqrrTotalRows'
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})
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})
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
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)
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'
1690-- * 'qrKind'
1847-- * 'qrKind'
1849+-- * 'qrQueryParameters'
1692-- * 'qrQuery'
1851-- * 'qrQuery'
1853+-- * 'qrParameterMode'
1694-- * 'qrTimeoutMs'
1855-- * 'qrTimeoutMs'
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})
1899+-- | [Experimental] Query parameters for Standard SQL queries.
1900+qrQueryParameters :: Lens' QueryRequest [QueryParameter]
1902+ = lens _qrQueryParameters
1903+ (\ s a -> s{_qrQueryParameters = a})
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})
1913+-- | [Experimental] Standard SQL only. Whether to use positional (?) or named
1914+-- (\'myparam) query parameters in this query.
1915+qrParameterMode :: Lens' QueryRequest (Maybe Text)
1917+ = lens _qrParameterMode
1918+ (\ s a -> s{_qrParameterMode = a})
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])
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)
2011+-- | Creates a value of 'QueryParameter' with the minimum fields required to make a request.
2013+-- Use one of the following lenses to modify other fields as desired:
2015+-- * 'qpParameterValue'
2017+-- * 'qpParameterType'
2024+ { _qpParameterValue = Nothing
2025+ , _qpParameterType = Nothing
2026+ , _qpName = Nothing
2029+-- | [Required] The value of this parameter.
2030+qpParameterValue :: Lens' QueryParameter (Maybe QueryParameterValue)
2032+ = lens _qpParameterValue
2033+ (\ s a -> s{_qpParameterValue = a})
2035+-- | [Required] The type of this parameter.
2036+qpParameterType :: Lens' QueryParameter (Maybe QueryParameterType)
2038+ = lens _qpParameterType
2039+ (\ s a -> s{_qpParameterType = a})
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})
2046+instance FromJSON QueryParameter where
2048+ = withObject "QueryParameter"
2050+ QueryParameter' <$>
2051+ (o .:? "parameterValue") <*> (o .:? "parameterType")
2052+ <*> (o .:? "name"))
2054+instance ToJSON QueryParameter where
2055+ toJSON QueryParameter'{..}
2058+ [("parameterValue" .=) <$> _qpParameterValue,
2059+ ("parameterType" .=) <$> _qpParameterType,
2060+ ("name" .=) <$> _qpName])
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'
2125-- * 'jclIgnoreUnknownValues'
2368-- * 'jclIgnoreUnknownValues'
2370+-- * 'jclSchemaUpdateOptions'
2127-- * 'jclCreateDisPosition'
2372-- * 'jclCreateDisPosition'
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})
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})
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])
3275+-- | [Optional] The struct field values, in order of the struct type\'s
3278+-- /See:/ 'queryParameterValueStructValues' smart constructor.
3279+newtype QueryParameterValueStructValues = QueryParameterValueStructValues'
3280+ { _qpvsvAddtional :: HashMap Text QueryParameterValue
3281+ } deriving (Eq,Show,Data,Typeable,Generic)
3283+-- | Creates a value of 'QueryParameterValueStructValues' with the minimum fields required to make a request.
3285+-- Use one of the following lenses to modify other fields as desired:
3287+-- * 'qpvsvAddtional'
3288+queryParameterValueStructValues
3289+ :: HashMap Text QueryParameterValue -- ^ 'qpvsvAddtional'
3290+ -> QueryParameterValueStructValues
3291+queryParameterValueStructValues pQpvsvAddtional_ =
3292+ QueryParameterValueStructValues'
3293+ { _qpvsvAddtional = _Coerce # pQpvsvAddtional_
3296+qpvsvAddtional :: Lens' QueryParameterValueStructValues (HashMap Text QueryParameterValue)
3298+ = lens _qpvsvAddtional
3299+ (\ s a -> s{_qpvsvAddtional = a})
3302+instance FromJSON QueryParameterValueStructValues
3305+ = withObject "QueryParameterValueStructValues"
3307+ QueryParameterValueStructValues' <$>
3308+ (parseJSONObject o))
3310+instance ToJSON QueryParameterValueStructValues where
3311+ toJSON = toJSON . _qpvsvAddtional
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
3318+-- /See:/ 'dataSetLabels' smart constructor.
3319+newtype DataSetLabels = DataSetLabels'
3320+ { _dslAddtional :: HashMap Text Text
3321+ } deriving (Eq,Show,Data,Typeable,Generic)
3323+-- | Creates a value of 'DataSetLabels' with the minimum fields required to make a request.
3325+-- Use one of the following lenses to modify other fields as desired:
3329+ :: HashMap Text Text -- ^ 'dslAddtional'
3331+dataSetLabels pDslAddtional_ =
3333+ { _dslAddtional = _Coerce # pDslAddtional_
3336+dslAddtional :: Lens' DataSetLabels (HashMap Text Text)
3338+ = lens _dslAddtional (\ s a -> s{_dslAddtional = a})
3341+instance FromJSON DataSetLabels where
3343+ = withObject "DataSetLabels"
3344+ (\ o -> DataSetLabels' <$> (parseJSONObject o))
3346+instance ToJSON DataSetLabels where
3347+ toJSON = toJSON . _dslAddtional
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)
@@ -3029,6 +3369,8 @@ data JobConfiguration = JobConfiguration'
3030-- * 'jcExtract'
3370-- * 'jcExtract'
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
@@ -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})
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})
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"))
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])
@@ -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'
3490-- * 'jcqTableDefinitions'
3849-- * 'jcqTableDefinitions'
3851+-- * 'jcqQueryParameters'
3853+-- * 'jcqSchemaUpdateOptions'
3855+-- * 'jcqMaximumBytesBilled'
3492-- * 'jcqCreateDisPosition'
3857-- * 'jcqCreateDisPosition'
3494-- * 'jcqUserDefinedFunctionResources'
3859-- * 'jcqUserDefinedFunctionResources'
@@ -3501,6 +3866,8 @@ data JobConfigurationQuery = JobConfigurationQuery'
3502-- * 'jcqFlattenResults'
3867-- * 'jcqFlattenResults'
3869+-- * 'jcqParameterMode'
3504-- * 'jcqUseLegacySQL'
3871-- * 'jcqUseLegacySQL'
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
@@ -3576,6 +3947,39 @@ jcqTableDefinitions
3576 = lens _jcqTableDefinitions
3947 = lens _jcqTableDefinitions
3577 (\ s a -> s{_jcqTableDefinitions = a})
3948 (\ s a -> s{_jcqTableDefinitions = a})
3950+-- | Query parameters for standard SQL queries.
3951+jcqQueryParameters :: Lens' JobConfigurationQuery [QueryParameter]
3953+ = lens _jcqQueryParameters
3954+ (\ s a -> s{_jcqQueryParameters = a})
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})
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})
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})
4031+-- | [Experimental] Standard SQL only. Whether to use positional (?) or named
4032+-- (\'myparam) query parameters in this query.
4033+jcqParameterMode :: Lens' JobConfigurationQuery (Maybe Text)
4035+ = lens _jcqParameterMode
4036+ (\ s a -> s{_jcqParameterMode = a})
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"))
@@ -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])
@@ -3920,11 +4340,73 @@ instance ToJSON TableCell where
3920 toJSON TableCell'{..}
4340 toJSON TableCell'{..}
3921 = object (catMaybes [("v" .=) <$> _tcV])
4341 = object (catMaybes [("v" .=) <$> _tcV])
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)
4351+-- | Creates a value of 'QueryParameterValue' with the minimum fields required to make a request.
4353+-- Use one of the following lenses to modify other fields as desired:
4355+-- * 'qpvStructValues'
4359+-- * 'qpvArrayValues'
4361+ :: QueryParameterValue
4362+queryParameterValue =
4363+ QueryParameterValue'
4364+ { _qpvStructValues = Nothing
4365+ , _qpvValue = Nothing
4366+ , _qpvArrayValues = Nothing
4369+-- | [Optional] The struct field values, in order of the struct type\'s
4371+qpvStructValues :: Lens' QueryParameterValue (Maybe QueryParameterValueStructValues)
4373+ = lens _qpvStructValues
4374+ (\ s a -> s{_qpvStructValues = a})
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})
4380+-- | [Optional] The array values, if this is an array type.
4381+qpvArrayValues :: Lens' QueryParameterValue [QueryParameterValue]
4383+ = lens _qpvArrayValues
4384+ (\ s a -> s{_qpvArrayValues = a})
4388+instance FromJSON QueryParameterValue where
4390+ = withObject "QueryParameterValue"
4392+ QueryParameterValue' <$>
4393+ (o .:? "structValues") <*> (o .:? "value") <*>
4394+ (o .:? "arrayValues" .!= mempty))
4396+instance ToJSON QueryParameterValue where
4397+ toJSON QueryParameterValue'{..}
4400+ [("structValues" .=) <$> _qpvStructValues,
4401+ ("value" .=) <$> _qpvValue,
4402+ ("arrayValues" .=) <$> _qpvArrayValues])
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)
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'
3936-- * 'vdQuery'
4418-- * 'vdQuery'
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
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})
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)
4450+ = lens _vdUseLegacySQL
4451+ (\ s a -> s{_vdUseLegacySQL = a})
3958instance FromJSON ViewDefinition where
4453instance FromJSON ViewDefinition where
3959 parseJSON
4454 parseJSON
3960 = withObject "ViewDefinition"
4455 = withObject "ViewDefinition"
3962 ViewDefinition' <$>
4457 ViewDefinition' <$>
3963 (o .:? "userDefinedFunctionResources" .!= mempty) <*>
4458 (o .:? "userDefinedFunctionResources" .!= mempty) <*>
3964− (o .:? "query"))
4459+ (o .:? "query")
4460+ <*> (o .:? "useLegacySql"))
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])
3975-- /See:/ 'userDefinedFunctionResource' smart constructor.
4472-- /See:/ 'userDefinedFunctionResource' smart constructor.
@@ -4025,13 +4522,15 @@ instance ToJSON UserDefinedFunctionResource where
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)
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'
4045-- * 'jBillingTier'
4544-- * 'jBillingTier'
4546+-- * 'jUndeclaredQueryParameters'
4047-- * 'jReferencedTables'
4548-- * 'jReferencedTables'
4550+-- * 'jNumDmlAffectedRows'
4049-- * 'jQueryPlan'
4552-- * 'jQueryPlan'
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
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})
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
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)
4612+ = lens _jNumDmlAffectedRows
4613+ (\ s a -> s{_jNumDmlAffectedRows = a})
4094−-- | [Output-only, Experimental] Describes execution plan for the query as a
4616+-- | [Output-only, Experimental] Describes execution plan for the query.
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])
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)
4886+-- | Creates a value of 'QueryParameterType' with the minimum fields required to make a request.
4888+-- Use one of the following lenses to modify other fields as desired:
4890+-- * 'qptStructTypes'
4896+ :: QueryParameterType
4897+queryParameterType =
4898+ QueryParameterType'
4899+ { _qptStructTypes = Nothing
4900+ , _qptType = Nothing
4901+ , _qptArrayType = Nothing
4904+-- | [Optional] The types of the fields of this struct, in order, if this is
4906+qptStructTypes :: Lens' QueryParameterType [QueryParameterTypeStructTypesItem]
4908+ = lens _qptStructTypes
4909+ (\ s a -> s{_qptStructTypes = a})
4913+-- | [Required] The top level type of this field.
4914+qptType :: Lens' QueryParameterType (Maybe Text)
4915+qptType = lens _qptType (\ s a -> s{_qptType = a})
4917+-- | [Optional] The type of the array\'s elements, if this is an array.
4918+qptArrayType :: Lens' QueryParameterType (Maybe QueryParameterType)
4920+ = lens _qptArrayType (\ s a -> s{_qptArrayType = a})
4922+instance FromJSON QueryParameterType where
4924+ = withObject "QueryParameterType"
4926+ QueryParameterType' <$>
4927+ (o .:? "structTypes" .!= mempty) <*> (o .:? "type")
4928+ <*> (o .:? "arrayType"))
4930+instance ToJSON QueryParameterType where
4931+ toJSON QueryParameterType'{..}
4934+ [("structTypes" .=) <$> _qptStructTypes,
4935+ ("type" .=) <$> _qptType,
4936+ ("arrayType" .=) <$> _qptArrayType])
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'
4913-- * 'qPageToken'
5500-- * 'qPageToken'
5502+-- * 'qNumDmlAffectedRows'
4915-- * 'qTotalRows'
5504-- * 'qTotalRows'
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})
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)
5574+ = lens _qNumDmlAffectedRows
5575+ (\ s a -> s{_qNumDmlAffectedRows = a})
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])
5637+-- | [Experimental] The labels associated with this dataset. You can use
5638+-- these to organize and group your datasets.
5640+-- /See:/ 'dataSetListDataSetsItemLabels' smart constructor.
5641+newtype DataSetListDataSetsItemLabels = DataSetListDataSetsItemLabels'
5642+ { _dsldsilAddtional :: HashMap Text Text
5643+ } deriving (Eq,Show,Data,Typeable,Generic)
5645+-- | Creates a value of 'DataSetListDataSetsItemLabels' with the minimum fields required to make a request.
5647+-- Use one of the following lenses to modify other fields as desired:
5649+-- * 'dsldsilAddtional'
5650+dataSetListDataSetsItemLabels
5651+ :: HashMap Text Text -- ^ 'dsldsilAddtional'
5652+ -> DataSetListDataSetsItemLabels
5653+dataSetListDataSetsItemLabels pDsldsilAddtional_ =
5654+ DataSetListDataSetsItemLabels'
5655+ { _dsldsilAddtional = _Coerce # pDsldsilAddtional_
5658+dsldsilAddtional :: Lens' DataSetListDataSetsItemLabels (HashMap Text Text)
5660+ = lens _dsldsilAddtional
5661+ (\ s a -> s{_dsldsilAddtional = a})
5664+instance FromJSON DataSetListDataSetsItemLabels where
5666+ = withObject "DataSetListDataSetsItemLabels"
5668+ DataSetListDataSetsItemLabels' <$>
5669+ (parseJSONObject o))
5671+instance ToJSON DataSetListDataSetsItemLabels where
5672+ toJSON = toJSON . _dsldsilAddtional