on develop help sign in
Regenerating gogol-bigquery from latest service definition
f00ac67Brendan Hay
gogol-bigquery/gen/Network/Google/BigQuery.hs+8
@@ -390,6 +390,12 @@ module Network.Google.BigQuery
390 , jljiStatistics
390 , jljiStatistics
391 , jljiConfiguration
391 , jljiConfiguration
392
392
393+ -- ** TimePartitioning
394+ , TimePartitioning
395+ , timePartitioning
396+ , tpExpirationMs
397+ , tpType
398+
393 -- ** JobConfiguration
399 -- ** JobConfiguration
394 , JobConfiguration
400 , JobConfiguration
395 , jobConfiguration
401 , jobConfiguration
@@ -497,6 +503,7 @@ module Network.Google.BigQuery
497 -- ** JobStatistics2
503 -- ** JobStatistics2
498 , JobStatistics2
504 , JobStatistics2
499 , jobStatistics2
505 , jobStatistics2
506+ , jSchema
500 , jTotalBytesProcessed
507 , jTotalBytesProcessed
501 , jBillingTier
508 , jBillingTier
502 , jReferencedTables
509 , jReferencedTables
@@ -542,6 +549,7 @@ module Network.Google.BigQuery
542 , tabSchema
549 , tabSchema
543 , tabStreamingBuffer
550 , tabStreamingBuffer
544 , tabSelfLink
551 , tabSelfLink
552+ , tabTimePartitioning
545 , tabNumRows
553 , tabNumRows
546 , tabView
554 , tabView
547 , tabId
555 , tabId
gogol-bigquery/gen/Network/Google/BigQuery/Types.hs+8
@@ -318,6 +318,12 @@ module Network.Google.BigQuery.Types
318 , jljiStatistics
318 , jljiStatistics
319 , jljiConfiguration
319 , jljiConfiguration
320
320
321+ -- * TimePartitioning
322+ , TimePartitioning
323+ , timePartitioning
324+ , tpExpirationMs
325+ , tpType
326+
321 -- * JobConfiguration
327 -- * JobConfiguration
322 , JobConfiguration
328 , JobConfiguration
323 , jobConfiguration
329 , jobConfiguration
@@ -425,6 +431,7 @@ module Network.Google.BigQuery.Types
425 -- * JobStatistics2
431 -- * JobStatistics2
426 , JobStatistics2
432 , JobStatistics2
427 , jobStatistics2
433 , jobStatistics2
434+ , jSchema
428 , jTotalBytesProcessed
435 , jTotalBytesProcessed
429 , jBillingTier
436 , jBillingTier
430 , jReferencedTables
437 , jReferencedTables
@@ -470,6 +477,7 @@ module Network.Google.BigQuery.Types
470 , tabSchema
477 , tabSchema
471 , tabStreamingBuffer
478 , tabStreamingBuffer
472 , tabSelfLink
479 , tabSelfLink
480+ , tabTimePartitioning
473 , tabNumRows
481 , tabNumRows
474 , tabView
482 , tabView
475 , tabId
483 , tabId
gogol-bigquery/gen/Network/Google/BigQuery/Types/Product.hs+91−20
@@ -979,7 +979,7 @@ dsSelfLink
979dsId :: Lens' DataSet (Maybe Text)
979dsId :: Lens' DataSet (Maybe Text)
980dsId = lens _dsId (\ s a -> s{_dsId = a})
980dsId = lens _dsId (\ s a -> s{_dsId = a})
981
981
982−-- | [Experimental] The default lifetime of all tables in the dataset, in
982+-- | [Optional] The default lifetime of all tables in the dataset, in
983-- milliseconds. The minimum value is 3600000 milliseconds (one hour). Once
983-- milliseconds. The minimum value is 3600000 milliseconds (one hour). Once
984-- this property is set, all newly-created tables in the dataset will have
984-- this property is set, all newly-created tables in the dataset will have
985-- an expirationTime property set to the creation time plus the value in
985-- an expirationTime property set to the creation time plus the value in
@@ -1369,9 +1369,9 @@ tfsMode = lens _tfsMode (\ s a -> s{_tfsMode = a})
1369tfsName :: Lens' TableFieldSchema (Maybe Text)
1369tfsName :: Lens' TableFieldSchema (Maybe Text)
1370tfsName = lens _tfsName (\ s a -> s{_tfsName = a})
1370tfsName = lens _tfsName (\ s a -> s{_tfsName = a})
1371
1371
1372−-- | [Required] The field data type. Possible values include STRING, INTEGER,
1372+-- | [Required] The field data type. Possible values include STRING, BYTES,
1373−-- FLOAT, BOOLEAN, TIMESTAMP or RECORD (where RECORD indicates that the
1373+-- INTEGER, FLOAT, BOOLEAN, TIMESTAMP or RECORD (where RECORD indicates
1374−-- field contains a nested schema).
1374+-- that the field contains a nested schema).
1375tfsType :: Lens' TableFieldSchema (Maybe Text)
1375tfsType :: Lens' TableFieldSchema (Maybe Text)
1376tfsType = lens _tfsType (\ s a -> s{_tfsType = a})
1376tfsType = lens _tfsType (\ s a -> s{_tfsType = a})
1377
1377
@@ -1741,10 +1741,10 @@ qrTimeoutMs
1741-- | [Experimental] Specifies whether to use BigQuery\'s legacy SQL dialect
1741-- | [Experimental] Specifies whether to use BigQuery\'s legacy SQL dialect
1742-- for this query. The default value is true. If set to false, the query
1742-- for this query. The default value is true. If set to false, the query
1743-- will use BigQuery\'s updated SQL dialect with improved standards
1743-- will use BigQuery\'s updated SQL dialect with improved standards
1744+-- compliance: https:\/\/cloud.google.com\/bigquery\/sql-reference\/ When
1744−-- compliance. When using BigQuery\'s updated SQL, the values of
1745+-- using BigQuery\'s updated SQL, the values of allowLargeResults and
1745−-- allowLargeResults and flattenResults are ignored. Queries with
1746+-- flattenResults are ignored. Queries with useLegacySql set to false will
1746−-- useLegacySql set to false will be run as if allowLargeResults is true
1747−-- and flattenResults is false.
1747+-- be run as if allowLargeResults is true and flattenResults is false.
1748qrUseLegacySQL :: Lens' QueryRequest (Maybe Bool)
1748qrUseLegacySQL :: Lens' QueryRequest (Maybe Bool)
1749qrUseLegacySQL
1749qrUseLegacySQL
1750 = lens _qrUseLegacySQL
1750 = lens _qrUseLegacySQL
@@ -2250,8 +2250,8 @@ jclAllowQuotedNewlines
2250
2250
2251-- | [Optional] The format of the data files. For CSV files, specify \"CSV\".
2251-- | [Optional] The format of the data files. For CSV files, specify \"CSV\".
2252-- For datastore backups, specify \"DATASTORE_BACKUP\". For
2252-- For datastore backups, specify \"DATASTORE_BACKUP\". For
2253−-- newline-delimited JSON, specify \"NEWLINE_DELIMITED_JSON\". The default
2253+-- newline-delimited JSON, specify \"NEWLINE_DELIMITED_JSON\". For Avro,
2254−-- value is CSV.
2254+-- specify \"AVRO\". The default value is CSV.
2255jclSourceFormat :: Lens' JobConfigurationLoad (Maybe Text)
2255jclSourceFormat :: Lens' JobConfigurationLoad (Maybe Text)
2256jclSourceFormat
2256jclSourceFormat
2257 = lens _jclSourceFormat
2257 = lens _jclSourceFormat
@@ -2932,6 +2932,55 @@ instance ToJSON JobListJobsItem where
2932 ("statistics" .=) <$> _jljiStatistics,
2932 ("statistics" .=) <$> _jljiStatistics,
2933 ("configuration" .=) <$> _jljiConfiguration])
2933 ("configuration" .=) <$> _jljiConfiguration])
2934
2934
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+
2935--
2984--
2936-- /See:/ 'jobConfiguration' smart constructor.
2985-- /See:/ 'jobConfiguration' smart constructor.
2937data JobConfiguration = JobConfiguration'
2986data JobConfiguration = JobConfiguration'
@@ -3552,10 +3601,10 @@ jcqFlattenResults
3552-- | [Experimental] Specifies whether to use BigQuery\'s legacy SQL dialect
3601-- | [Experimental] Specifies whether to use BigQuery\'s legacy SQL dialect
3553-- for this query. The default value is true. If set to false, the query
3602-- for this query. The default value is true. If set to false, the query
3554-- will use BigQuery\'s updated SQL dialect with improved standards
3603-- will use BigQuery\'s updated SQL dialect with improved standards
3604+-- compliance: https:\/\/cloud.google.com\/bigquery\/sql-reference\/ When
3555−-- compliance. When using BigQuery\'s updated SQL, the values of
3605+-- using BigQuery\'s updated SQL, the values of allowLargeResults and
3556−-- allowLargeResults and flattenResults are ignored. Queries with
3606+-- flattenResults are ignored. Queries with useLegacySql set to false will
3557−-- useLegacySql set to false will be run as if allowLargeResults is true
3558−-- and flattenResults is false.
3607+-- be run as if allowLargeResults is true and flattenResults is false.
3559jcqUseLegacySQL :: Lens' JobConfigurationQuery (Maybe Bool)
3608jcqUseLegacySQL :: Lens' JobConfigurationQuery (Maybe Bool)
3560jcqUseLegacySQL
3609jcqUseLegacySQL
3561 = lens _jcqUseLegacySQL
3610 = lens _jcqUseLegacySQL
@@ -3903,7 +3952,8 @@ instance ToJSON UserDefinedFunctionResource where
3903--
3952--
3904-- /See:/ 'jobStatistics2' smart constructor.
3953-- /See:/ 'jobStatistics2' smart constructor.
3905data JobStatistics2 = JobStatistics2'
3954data JobStatistics2 = JobStatistics2'
3955+ { _jSchema :: !(Maybe TableSchema)
3906− { _jTotalBytesProcessed :: !(Maybe (Textual Int64))
3956+ , _jTotalBytesProcessed :: !(Maybe (Textual Int64))
3907 , _jBillingTier :: !(Maybe (Textual Int32))
3957 , _jBillingTier :: !(Maybe (Textual Int32))
3908 , _jReferencedTables :: !(Maybe [TableReference])
3958 , _jReferencedTables :: !(Maybe [TableReference])
3909 , _jQueryPlan :: !(Maybe [ExplainQueryStage])
3959 , _jQueryPlan :: !(Maybe [ExplainQueryStage])
@@ -3915,6 +3965,8 @@ data JobStatistics2 = JobStatistics2'
3915--
3965--
3916-- Use one of the following lenses to modify other fields as desired:
3966-- Use one of the following lenses to modify other fields as desired:
3917--
3967--
3968+-- * 'jSchema'
3969+--
3918-- * 'jTotalBytesProcessed'
3970-- * 'jTotalBytesProcessed'
3919--
3971--
3920-- * 'jBillingTier'
3972-- * 'jBillingTier'
@@ -3930,7 +3982,8 @@ jobStatistics2
3930 :: JobStatistics2
3982 :: JobStatistics2
3931jobStatistics2 =
3983jobStatistics2 =
3932 JobStatistics2'
3984 JobStatistics2'
3985+ { _jSchema = Nothing
3933− { _jTotalBytesProcessed = Nothing
3986+ , _jTotalBytesProcessed = Nothing
3934 , _jBillingTier = Nothing
3987 , _jBillingTier = Nothing
3935 , _jReferencedTables = Nothing
3988 , _jReferencedTables = Nothing
3936 , _jQueryPlan = Nothing
3989 , _jQueryPlan = Nothing
@@ -3938,6 +3991,11 @@ jobStatistics2 =
3938 , _jTotalBytesBilled = Nothing
3991 , _jTotalBytesBilled = Nothing
3939 }
3992 }
3940
3993
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+
3941-- | [Output-only] Total bytes processed for the job.
3999-- | [Output-only] Total bytes processed for the job.
3942jTotalBytesProcessed :: Lens' JobStatistics2 (Maybe Int64)
4000jTotalBytesProcessed :: Lens' JobStatistics2 (Maybe Int64)
3943jTotalBytesProcessed
4001jTotalBytesProcessed
@@ -3985,8 +4043,8 @@ instance FromJSON JobStatistics2 where
3985 = withObject "JobStatistics2"
4043 = withObject "JobStatistics2"
3986 (\ o ->
4044 (\ o ->
3987 JobStatistics2' <$>
4045 JobStatistics2' <$>
3988− (o .:? "totalBytesProcessed") <*>
4046+ (o .:? "schema") <*> (o .:? "totalBytesProcessed")
3989− (o .:? "billingTier")
4047+ <*> (o .:? "billingTier")
3990 <*> (o .:? "referencedTables" .!= mempty)
4048 <*> (o .:? "referencedTables" .!= mempty)
3991 <*> (o .:? "queryPlan" .!= mempty)
4049 <*> (o .:? "queryPlan" .!= mempty)
3992 <*> (o .:? "cacheHit")
4050 <*> (o .:? "cacheHit")
@@ -3996,8 +4054,8 @@ instance ToJSON JobStatistics2 where
3996 toJSON JobStatistics2'{..}
4054 toJSON JobStatistics2'{..}
3997 = object
4055 = object
3998 (catMaybes
4056 (catMaybes
3999− [("totalBytesProcessed" .=) <$>
4057+ [("schema" .=) <$> _jSchema,
4000− _jTotalBytesProcessed,
4058+ ("totalBytesProcessed" .=) <$> _jTotalBytesProcessed,
4001 ("billingTier" .=) <$> _jBillingTier,
4059 ("billingTier" .=) <$> _jBillingTier,
4002 ("referencedTables" .=) <$> _jReferencedTables,
4060 ("referencedTables" .=) <$> _jReferencedTables,
4003 ("queryPlan" .=) <$> _jQueryPlan,
4061 ("queryPlan" .=) <$> _jQueryPlan,
@@ -4233,6 +4291,7 @@ data Table = Table'
4233 , _tabSchema :: !(Maybe TableSchema)
4291 , _tabSchema :: !(Maybe TableSchema)
4234 , _tabStreamingBuffer :: !(Maybe Streamingbuffer)
4292 , _tabStreamingBuffer :: !(Maybe Streamingbuffer)
4235 , _tabSelfLink :: !(Maybe Text)
4293 , _tabSelfLink :: !(Maybe Text)
4294+ , _tabTimePartitioning :: !(Maybe TimePartitioning)
4236 , _tabNumRows :: !(Maybe (Textual Word64))
4295 , _tabNumRows :: !(Maybe (Textual Word64))
4237 , _tabView :: !(Maybe ViewDefinition)
4296 , _tabView :: !(Maybe ViewDefinition)
4238 , _tabId :: !(Maybe Text)
4297 , _tabId :: !(Maybe Text)
@@ -4269,6 +4328,8 @@ data Table = Table'
4269--
4328--
4270-- * 'tabSelfLink'
4329-- * 'tabSelfLink'
4271--
4330--
4331+-- * 'tabTimePartitioning'
4332+--
4272-- * 'tabNumRows'
4333-- * 'tabNumRows'
4273--
4334--
4274-- * 'tabView'
4335-- * 'tabView'
@@ -4296,6 +4357,7 @@ table =
4296 , _tabSchema = Nothing
4357 , _tabSchema = Nothing
4297 , _tabStreamingBuffer = Nothing
4358 , _tabStreamingBuffer = Nothing
4298 , _tabSelfLink = Nothing
4359 , _tabSelfLink = Nothing
4360+ , _tabTimePartitioning = Nothing
4299 , _tabNumRows = Nothing
4361 , _tabNumRows = Nothing
4300 , _tabView = Nothing
4362 , _tabView = Nothing
4301 , _tabId = Nothing
4363 , _tabId = Nothing
@@ -4379,6 +4441,13 @@ tabSelfLink :: Lens' Table (Maybe Text)
4379tabSelfLink
4441tabSelfLink
4380 = lens _tabSelfLink (\ s a -> s{_tabSelfLink = a})
4442 = lens _tabSelfLink (\ s a -> s{_tabSelfLink = a})
4381
4443
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+
4382-- | [Output-only] The number of rows of data in this table, excluding any
4451-- | [Output-only] The number of rows of data in this table, excluding any
4383-- data in the streaming buffer.
4452-- data in the streaming buffer.
4384tabNumRows :: Lens' Table (Maybe Word64)
4453tabNumRows :: Lens' Table (Maybe Word64)
@@ -4433,6 +4502,7 @@ instance FromJSON Table where
4433 <*> (o .:? "schema")
4502 <*> (o .:? "schema")
4434 <*> (o .:? "streamingBuffer")
4503 <*> (o .:? "streamingBuffer")
4435 <*> (o .:? "selfLink")
4504 <*> (o .:? "selfLink")
4505+ <*> (o .:? "timePartitioning")
4436 <*> (o .:? "numRows")
4506 <*> (o .:? "numRows")
4437 <*> (o .:? "view")
4507 <*> (o .:? "view")
4438 <*> (o .:? "id")
4508 <*> (o .:? "id")
@@ -4457,6 +4527,7 @@ instance ToJSON Table where
4457 ("schema" .=) <$> _tabSchema,
4527 ("schema" .=) <$> _tabSchema,
4458 ("streamingBuffer" .=) <$> _tabStreamingBuffer,
4528 ("streamingBuffer" .=) <$> _tabStreamingBuffer,
4459 ("selfLink" .=) <$> _tabSelfLink,
4529 ("selfLink" .=) <$> _tabSelfLink,
4530+ ("timePartitioning" .=) <$> _tabTimePartitioning,
4460 ("numRows" .=) <$> _tabNumRows,
4531 ("numRows" .=) <$> _tabNumRows,
4461 ("view" .=) <$> _tabView, ("id" .=) <$> _tabId,
4532 ("view" .=) <$> _tabView, ("id" .=) <$> _tabId,
4462 ("type" .=) <$> _tabType,
4533 ("type" .=) <$> _tabType,