@@ -979,7 +979,7 @@ dsSelfLink
979979dsId :: Lens' DataSet (Maybe Text)
980980dsId = lens _dsId (\ s a -> s{_dsId = a})
981981
982−-- | [Experimental] The default lifetime of all tables in the dataset, in
982+-- | [Optional] The default lifetime of all tables in the dataset, in
983983-- milliseconds. The minimum value is 3600000 milliseconds (one hour). Once
984984-- this property is set, all newly-created tables in the dataset will have
985985-- an expirationTime property set to the creation time plus the value in
@@ -1369,9 +1369,9 @@ tfsMode = lens _tfsMode (\ s a -> s{_tfsMode = a})
13691369tfsName :: Lens' TableFieldSchema (Maybe Text)
13701370tfsName = lens _tfsName (\ s a -> s{_tfsName = a})
13711371
1372−-- | [Required] The field data type. Possible values include STRING, INTEGER,
1373−-- FLOAT, BOOLEAN, TIMESTAMP or RECORD (where RECORD indicates that the
1374−-- field contains a nested schema).
1372+-- | [Required] The field data type. Possible values include STRING, BYTES,
1373+-- INTEGER, FLOAT, BOOLEAN, TIMESTAMP or RECORD (where RECORD indicates
1374+-- that the field contains a nested schema).
13751375tfsType :: Lens' TableFieldSchema (Maybe Text)
13761376tfsType = lens _tfsType (\ s a -> s{_tfsType = a})
13771377
@@ -1741,10 +1741,10 @@ qrTimeoutMs
17411741-- | [Experimental] Specifies whether to use BigQuery\'s legacy SQL dialect
17421742-- for this query. The default value is true. If set to false, the query
17431743-- will use BigQuery\'s updated SQL dialect with improved standards
1744−-- compliance. When using BigQuery\'s updated SQL, the values of
1745−-- allowLargeResults and flattenResults are ignored. Queries with
1746−-- useLegacySql set to false will be run as if allowLargeResults is true
1747−-- and flattenResults is false.
1744+-- compliance: https:\/\/cloud.google.com\/bigquery\/sql-reference\/ When
1745+-- using BigQuery\'s updated SQL, the values of allowLargeResults and
1746+-- flattenResults are ignored. Queries with useLegacySql set to false will
1747+-- be run as if allowLargeResults is true and flattenResults is false.
17481748qrUseLegacySQL :: Lens' QueryRequest (Maybe Bool)
17491749qrUseLegacySQL
17501750 = lens _qrUseLegacySQL
@@ -2250,8 +2250,8 @@ jclAllowQuotedNewlines
22502250
22512251-- | [Optional] The format of the data files. For CSV files, specify \"CSV\".
22522252-- For datastore backups, specify \"DATASTORE_BACKUP\". For
2253−-- newline-delimited JSON, specify \"NEWLINE_DELIMITED_JSON\". The default
2254−-- value is CSV.
2253+-- newline-delimited JSON, specify \"NEWLINE_DELIMITED_JSON\". For Avro,
2254+-- specify \"AVRO\". The default value is CSV.
22552255jclSourceFormat :: Lens' JobConfigurationLoad (Maybe Text)
22562256jclSourceFormat
22572257 = lens _jclSourceFormat
@@ -2932,6 +2932,55 @@ instance ToJSON JobListJobsItem where
29322932 ("statistics" .=) <$> _jljiStatistics,
29332933 ("configuration" .=) <$> _jljiConfiguration])
29342934
2935+--
2936+-- /See:/ 'timePartitioning' smart constructor.
2937+data TimePartitioning = TimePartitioning'
2938+ { _tpExpirationMs :: !(Maybe (Textual Int64))
2939+ , _tpType :: !(Maybe Text)
2940+ } deriving (Eq,Show,Data,Typeable,Generic)
2941+
2942+-- | Creates a value of 'TimePartitioning' with the minimum fields required to make a request.
2943+--
2944+-- Use one of the following lenses to modify other fields as desired:
2945+--
2946+-- * 'tpExpirationMs'
2947+--
2948+-- * 'tpType'
2949+timePartitioning
2950+ :: TimePartitioning
2951+timePartitioning =
2952+ TimePartitioning'
2953+ { _tpExpirationMs = Nothing
2954+ , _tpType = Nothing
2955+ }
2956+
2957+-- | [Optional] Number of milliseconds for which to keep the storage for a
2958+-- partition.
2959+tpExpirationMs :: Lens' TimePartitioning (Maybe Int64)
2960+tpExpirationMs
2961+ = lens _tpExpirationMs
2962+ (\ s a -> s{_tpExpirationMs = a})
2963+ . mapping _Coerce
2964+
2965+-- | [Required] The only type supported is DAY, which will generate one
2966+-- partition per day based on data loading time.
2967+tpType :: Lens' TimePartitioning (Maybe Text)
2968+tpType = lens _tpType (\ s a -> s{_tpType = a})
2969+
2970+instance FromJSON TimePartitioning where
2971+ parseJSON
2972+ = withObject "TimePartitioning"
2973+ (\ o ->
2974+ TimePartitioning' <$>
2975+ (o .:? "expirationMs") <*> (o .:? "type"))
2976+
2977+instance ToJSON TimePartitioning where
2978+ toJSON TimePartitioning'{..}
2979+ = object
2980+ (catMaybes
2981+ [("expirationMs" .=) <$> _tpExpirationMs,
2982+ ("type" .=) <$> _tpType])
2983+
29352984--
29362985-- /See:/ 'jobConfiguration' smart constructor.
29372986data JobConfiguration = JobConfiguration'
@@ -3552,10 +3601,10 @@ jcqFlattenResults
35523601-- | [Experimental] Specifies whether to use BigQuery\'s legacy SQL dialect
35533602-- for this query. The default value is true. If set to false, the query
35543603-- will use BigQuery\'s updated SQL dialect with improved standards
3555−-- compliance. When using BigQuery\'s updated SQL, the values of
3556−-- allowLargeResults and flattenResults are ignored. Queries with
3557−-- useLegacySql set to false will be run as if allowLargeResults is true
3558−-- and flattenResults is false.
3604+-- compliance: https:\/\/cloud.google.com\/bigquery\/sql-reference\/ When
3605+-- using BigQuery\'s updated SQL, the values of allowLargeResults and
3606+-- flattenResults are ignored. Queries with useLegacySql set to false will
3607+-- be run as if allowLargeResults is true and flattenResults is false.
35593608jcqUseLegacySQL :: Lens' JobConfigurationQuery (Maybe Bool)
35603609jcqUseLegacySQL
35613610 = lens _jcqUseLegacySQL
@@ -3903,7 +3952,8 @@ instance ToJSON UserDefinedFunctionResource where
39033952--
39043953-- /See:/ 'jobStatistics2' smart constructor.
39053954data JobStatistics2 = JobStatistics2'
3906− { _jTotalBytesProcessed :: !(Maybe (Textual Int64))
3955+ { _jSchema :: !(Maybe TableSchema)
3956+ , _jTotalBytesProcessed :: !(Maybe (Textual Int64))
39073957 , _jBillingTier :: !(Maybe (Textual Int32))
39083958 , _jReferencedTables :: !(Maybe [TableReference])
39093959 , _jQueryPlan :: !(Maybe [ExplainQueryStage])
@@ -3915,6 +3965,8 @@ data JobStatistics2 = JobStatistics2'
39153965--
39163966-- Use one of the following lenses to modify other fields as desired:
39173967--
3968+-- * 'jSchema'
3969+--
39183970-- * 'jTotalBytesProcessed'
39193971--
39203972-- * 'jBillingTier'
@@ -3930,7 +3982,8 @@ jobStatistics2
39303982 :: JobStatistics2
39313983jobStatistics2 =
39323984 JobStatistics2'
3933− { _jTotalBytesProcessed = Nothing
3985+ { _jSchema = Nothing
3986+ , _jTotalBytesProcessed = Nothing
39343987 , _jBillingTier = Nothing
39353988 , _jReferencedTables = Nothing
39363989 , _jQueryPlan = Nothing
@@ -3938,6 +3991,11 @@ jobStatistics2 =
39383991 , _jTotalBytesBilled = Nothing
39393992 }
39403993
3994+-- | [Output-only, Experimental] The schema of the results. Present only for
3995+-- successful dry run of non-legacy SQL queries.
3996+jSchema :: Lens' JobStatistics2 (Maybe TableSchema)
3997+jSchema = lens _jSchema (\ s a -> s{_jSchema = a})
3998+
39413999-- | [Output-only] Total bytes processed for the job.
39424000jTotalBytesProcessed :: Lens' JobStatistics2 (Maybe Int64)
39434001jTotalBytesProcessed
@@ -3985,8 +4043,8 @@ instance FromJSON JobStatistics2 where
39854043 = withObject "JobStatistics2"
39864044 (\ o ->
39874045 JobStatistics2' <$>
3988− (o .:? "totalBytesProcessed") <*>
3989− (o .:? "billingTier")
4046+ (o .:? "schema") <*> (o .:? "totalBytesProcessed")
4047+ <*> (o .:? "billingTier")
39904048 <*> (o .:? "referencedTables" .!= mempty)
39914049 <*> (o .:? "queryPlan" .!= mempty)
39924050 <*> (o .:? "cacheHit")
@@ -3996,8 +4054,8 @@ instance ToJSON JobStatistics2 where
39964054 toJSON JobStatistics2'{..}
39974055 = object
39984056 (catMaybes
3999− [("totalBytesProcessed" .=) <$>
4000− _jTotalBytesProcessed,
4057+ [("schema" .=) <$> _jSchema,
4058+ ("totalBytesProcessed" .=) <$> _jTotalBytesProcessed,
40014059 ("billingTier" .=) <$> _jBillingTier,
40024060 ("referencedTables" .=) <$> _jReferencedTables,
40034061 ("queryPlan" .=) <$> _jQueryPlan,
@@ -4233,6 +4291,7 @@ data Table = Table'
42334291 , _tabSchema :: !(Maybe TableSchema)
42344292 , _tabStreamingBuffer :: !(Maybe Streamingbuffer)
42354293 , _tabSelfLink :: !(Maybe Text)
4294+ , _tabTimePartitioning :: !(Maybe TimePartitioning)
42364295 , _tabNumRows :: !(Maybe (Textual Word64))
42374296 , _tabView :: !(Maybe ViewDefinition)
42384297 , _tabId :: !(Maybe Text)
@@ -4269,6 +4328,8 @@ data Table = Table'
42694328--
42704329-- * 'tabSelfLink'
42714330--
4331+-- * 'tabTimePartitioning'
4332+--
42724333-- * 'tabNumRows'
42734334--
42744335-- * 'tabView'
@@ -4296,6 +4357,7 @@ table =
42964357 , _tabSchema = Nothing
42974358 , _tabStreamingBuffer = Nothing
42984359 , _tabSelfLink = Nothing
4360+ , _tabTimePartitioning = Nothing
42994361 , _tabNumRows = Nothing
43004362 , _tabView = Nothing
43014363 , _tabId = Nothing
@@ -4379,6 +4441,13 @@ tabSelfLink :: Lens' Table (Maybe Text)
43794441tabSelfLink
43804442 = lens _tabSelfLink (\ s a -> s{_tabSelfLink = a})
43814443
4444+-- | [Experimental] If specified, configures time-based partitioning for this
4445+-- table.
4446+tabTimePartitioning :: Lens' Table (Maybe TimePartitioning)
4447+tabTimePartitioning
4448+ = lens _tabTimePartitioning
4449+ (\ s a -> s{_tabTimePartitioning = a})
4450+
43824451-- | [Output-only] The number of rows of data in this table, excluding any
43834452-- data in the streaming buffer.
43844453tabNumRows :: Lens' Table (Maybe Word64)
@@ -4433,6 +4502,7 @@ instance FromJSON Table where
44334502 <*> (o .:? "schema")
44344503 <*> (o .:? "streamingBuffer")
44354504 <*> (o .:? "selfLink")
4505+ <*> (o .:? "timePartitioning")
44364506 <*> (o .:? "numRows")
44374507 <*> (o .:? "view")
44384508 <*> (o .:? "id")
@@ -4457,6 +4527,7 @@ instance ToJSON Table where
44574527 ("schema" .=) <$> _tabSchema,
44584528 ("streamingBuffer" .=) <$> _tabStreamingBuffer,
44594529 ("selfLink" .=) <$> _tabSelfLink,
4530+ ("timePartitioning" .=) <$> _tabTimePartitioning,
44604531 ("numRows" .=) <$> _tabNumRows,
44614532 ("view" .=) <$> _tabView, ("id" .=) <$> _tabId,
44624533 ("type" .=) <$> _tabType,