on develop help sign in
Regenerating gogol-bigquery from latest service definition
commit6ff96f95be3f89e3b4bc8f84e3d994aa46a6230d authorBrendan Hay <brendan.g.hay@gmail.com> dateMon 20 Jun 2016, 09:33 (10 years ago) parentc3fe606
3 files changed+129−26
gogol-bigquery/gen/Network/Google/BigQuery.hs+8 gogol-bigquery/gen/Network/Google/BigQuery/Types.hs+8 gogol-bigquery/gen/Network/Google/BigQuery/Types/Product.hs+113−26
gogol-bigquery/gen/Network/Google/BigQuery.hs+8
@@ -221,6 +221,7 @@ module Network.Google.BigQuery
221221 , edcSourceFormat
222222 , edcSchema
223223 , edcMaxBadRecords
224+ , edcGoogleSheetsOptions
224225 , edcAutodetect
225226 , edcSourceURIs
226227 , edcCSVOptions
@@ -324,6 +325,7 @@ module Network.Google.BigQuery
324325 , jclSchema
325326 , jclQuote
326327 , jclMaxBadRecords
328+ , jclAutodetect
327329 , jclSourceURIs
328330 , jclEncoding
329331 , jclFieldDelimiter
@@ -464,6 +466,11 @@ module Network.Google.BigQuery
464466 , jcqUseLegacySQL
465467 , jcqDefaultDataSet
466468
469+ -- ** GoogleSheetsOptions
470+ , GoogleSheetsOptions
471+ , googleSheetsOptions
472+ , gsoSkipLeadingRows
473+
467474 -- ** TableDataInsertAllRequestRowsItem
468475 , TableDataInsertAllRequestRowsItem
469476 , tableDataInsertAllRequestRowsItem
@@ -554,6 +561,7 @@ module Network.Google.BigQuery
554561 , tabView
555562 , tabId
556563 , tabType
564+ , tabNumLongTermBytes
557565 , tabExpirationTime
558566 , tabDescription
559567
gogol-bigquery/gen/Network/Google/BigQuery/Types.hs+8
@@ -149,6 +149,7 @@ module Network.Google.BigQuery.Types
149149 , edcSourceFormat
150150 , edcSchema
151151 , edcMaxBadRecords
152+ , edcGoogleSheetsOptions
152153 , edcAutodetect
153154 , edcSourceURIs
154155 , edcCSVOptions
@@ -252,6 +253,7 @@ module Network.Google.BigQuery.Types
252253 , jclSchema
253254 , jclQuote
254255 , jclMaxBadRecords
256+ , jclAutodetect
255257 , jclSourceURIs
256258 , jclEncoding
257259 , jclFieldDelimiter
@@ -392,6 +394,11 @@ module Network.Google.BigQuery.Types
392394 , jcqUseLegacySQL
393395 , jcqDefaultDataSet
394396
397+ -- * GoogleSheetsOptions
398+ , GoogleSheetsOptions
399+ , googleSheetsOptions
400+ , gsoSkipLeadingRows
401+
395402 -- * TableDataInsertAllRequestRowsItem
396403 , TableDataInsertAllRequestRowsItem
397404 , tableDataInsertAllRequestRowsItem
@@ -482,6 +489,7 @@ module Network.Google.BigQuery.Types
482489 , tabView
483490 , tabId
484491 , tabType
492+ , tabNumLongTermBytes
485493 , tabExpirationTime
486494 , tabDescription
487495
gogol-bigquery/gen/Network/Google/BigQuery/Types/Product.hs+113−26
@@ -1105,6 +1105,7 @@ data ExternalDataConfiguration = ExternalDataConfiguration'
11051105 , _edcSourceFormat :: !(Maybe Text)
11061106 , _edcSchema :: !(Maybe TableSchema)
11071107 , _edcMaxBadRecords :: !(Maybe (Textual Int32))
1108+ , _edcGoogleSheetsOptions :: !(Maybe GoogleSheetsOptions)
11081109 , _edcAutodetect :: !(Maybe Bool)
11091110 , _edcSourceURIs :: !(Maybe [Text])
11101111 , _edcCSVOptions :: !(Maybe CSVOptions)
@@ -1126,6 +1127,8 @@ data ExternalDataConfiguration = ExternalDataConfiguration'
11261127--
11271128-- * 'edcMaxBadRecords'
11281129--
1130+-- * 'edcGoogleSheetsOptions'
1131+--
11291132-- * 'edcAutodetect'
11301133--
11311134-- * 'edcSourceURIs'
@@ -1141,6 +1144,7 @@ externalDataConfiguration =
11411144 , _edcSourceFormat = Nothing
11421145 , _edcSchema = Nothing
11431146 , _edcMaxBadRecords = Nothing
1147+ , _edcGoogleSheetsOptions = Nothing
11441148 , _edcAutodetect = Nothing
11451149 , _edcSourceURIs = Nothing
11461150 , _edcCSVOptions = Nothing
@@ -1175,13 +1179,14 @@ edcCompression
11751179 = lens _edcCompression
11761180 (\ s a -> s{_edcCompression = a})
11771181
1178−-- | [Required] The data format. For CSV files, specify \"CSV\". For
1179−-- newline-delimited JSON, specify \"NEWLINE_DELIMITED_JSON\". For Avro
1180−-- files, specify \"AVRO\". For Google Cloud Datastore backups, specify
1181−-- \"DATASTORE_BACKUP\". [Experimental] For Google Cloud Bigtable, specify
1182−-- \"BIGTABLE\". Please note that reading from Google Cloud Bigtable is
1183−-- experimental and has to be enabled for your project. Please contact
1184−-- Google Cloud Support to enable this for your project.
1182+-- | [Required] The data format. For CSV files, specify \"CSV\". For Google
1183+-- sheets, specify \"GOOGLE_SHEETS\". For newline-delimited JSON, specify
1184+-- \"NEWLINE_DELIMITED_JSON\". For Avro files, specify \"AVRO\". For Google
1185+-- Cloud Datastore backups, specify \"DATASTORE_BACKUP\". [Experimental]
1186+-- For Google Cloud Bigtable, specify \"BIGTABLE\". Please note that
1187+-- reading from Google Cloud Bigtable is experimental and has to be enabled
1188+-- for your project. Please contact Google Cloud Support to enable this for
1189+-- your project.
11851190edcSourceFormat :: Lens' ExternalDataConfiguration (Maybe Text)
11861191edcSourceFormat
11871192 = lens _edcSourceFormat
@@ -1205,6 +1210,12 @@ edcMaxBadRecords
12051210 (\ s a -> s{_edcMaxBadRecords = a})
12061211 . mapping _Coerce
12071212
1213+-- | [Optional] Additional options if sourceFormat is set to GOOGLE_SHEETS.
1214+edcGoogleSheetsOptions :: Lens' ExternalDataConfiguration (Maybe GoogleSheetsOptions)
1215+edcGoogleSheetsOptions
1216+ = lens _edcGoogleSheetsOptions
1217+ (\ s a -> s{_edcGoogleSheetsOptions = a})
1218+
12081219-- | [Experimental] Try to detect schema and format options automatically.
12091220-- Any option specified explicitly will be honored.
12101221edcAutodetect :: Lens' ExternalDataConfiguration (Maybe Bool)
@@ -1215,13 +1226,12 @@ edcAutodetect
12151226-- | [Required] The fully-qualified URIs that point to your data in Google
12161227-- Cloud. For Google Cloud Storage URIs: Each URI can contain one \'*\'
12171228-- wildcard character and it must come after the \'bucket\' name. Size
1218−-- limits related to load jobs apply to external data sources, plus an
1219−-- additional limit of 10 GB maximum size across all URIs. For Google Cloud
1220−-- Bigtable URIs: Exactly one URI can be specified and it has be a fully
1221−-- specified and valid HTTPS URL for a Google Cloud Bigtable table. For
1222−-- Google Cloud Datastore backups, exactly one URI can be specified, and it
1223−-- must end with \'.backup_info\'. Also, the \'*\' wildcard character is
1224−-- not allowed.
1229+-- limits related to load jobs apply to external data sources. For Google
1230+-- Cloud Bigtable URIs: Exactly one URI can be specified and it has be a
1231+-- fully specified and valid HTTPS URL for a Google Cloud Bigtable table.
1232+-- For Google Cloud Datastore backups, exactly one URI can be specified,
1233+-- and it must end with \'.backup_info\'. Also, the \'*\' wildcard
1234+-- character is not allowed.
12251235edcSourceURIs :: Lens' ExternalDataConfiguration [Text]
12261236edcSourceURIs
12271237 = lens _edcSourceURIs
@@ -1246,6 +1256,7 @@ instance FromJSON ExternalDataConfiguration where
12461256 <*> (o .:? "sourceFormat")
12471257 <*> (o .:? "schema")
12481258 <*> (o .:? "maxBadRecords")
1259+ <*> (o .:? "googleSheetsOptions")
12491260 <*> (o .:? "autodetect")
12501261 <*> (o .:? "sourceUris" .!= mempty)
12511262 <*> (o .:? "csvOptions"))
@@ -1261,6 +1272,8 @@ instance ToJSON ExternalDataConfiguration where
12611272 ("sourceFormat" .=) <$> _edcSourceFormat,
12621273 ("schema" .=) <$> _edcSchema,
12631274 ("maxBadRecords" .=) <$> _edcMaxBadRecords,
1275+ ("googleSheetsOptions" .=) <$>
1276+ _edcGoogleSheetsOptions,
12641277 ("autodetect" .=) <$> _edcAutodetect,
12651278 ("sourceUris" .=) <$> _edcSourceURIs,
12661279 ("csvOptions" .=) <$> _edcCSVOptions])
@@ -1740,11 +1753,11 @@ qrTimeoutMs
17401753
17411754-- | [Experimental] Specifies whether to use BigQuery\'s legacy SQL dialect
17421755-- 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
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.
1756+-- will use BigQuery\'s standard SQL:
1757+-- https:\/\/cloud.google.com\/bigquery\/sql-reference\/ When useLegacySql
1758+-- is set to false, the values of allowLargeResults and flattenResults are
1759+-- ignored; query will be run as if allowLargeResults is true and
1760+-- flattenResults is false.
17481761qrUseLegacySQL :: Lens' QueryRequest (Maybe Bool)
17491762qrUseLegacySQL
17501763 = lens _qrUseLegacySQL
@@ -2087,6 +2100,7 @@ data JobConfigurationLoad = JobConfigurationLoad'
20872100 , _jclSchema :: !(Maybe TableSchema)
20882101 , _jclQuote :: !Text
20892102 , _jclMaxBadRecords :: !(Maybe (Textual Int32))
2103+ , _jclAutodetect :: !(Maybe Bool)
20902104 , _jclSourceURIs :: !(Maybe [Text])
20912105 , _jclEncoding :: !(Maybe Text)
20922106 , _jclFieldDelimiter :: !(Maybe Text)
@@ -2124,6 +2138,8 @@ data JobConfigurationLoad = JobConfigurationLoad'
21242138--
21252139-- * 'jclMaxBadRecords'
21262140--
2141+-- * 'jclAutodetect'
2142+--
21272143-- * 'jclSourceURIs'
21282144--
21292145-- * 'jclEncoding'
@@ -2147,6 +2163,7 @@ jobConfigurationLoad =
21472163 , _jclSchema = Nothing
21482164 , _jclQuote = "\""
21492165 , _jclMaxBadRecords = Nothing
2166+ , _jclAutodetect = Nothing
21502167 , _jclSourceURIs = Nothing
21512168 , _jclEncoding = Nothing
21522169 , _jclFieldDelimiter = Nothing
@@ -2284,6 +2301,13 @@ jclMaxBadRecords
22842301 (\ s a -> s{_jclMaxBadRecords = a})
22852302 . mapping _Coerce
22862303
2304+-- | [Experimental] Indicates if we should automatically infer the options
2305+-- and schema for CSV and JSON sources.
2306+jclAutodetect :: Lens' JobConfigurationLoad (Maybe Bool)
2307+jclAutodetect
2308+ = lens _jclAutodetect
2309+ (\ s a -> s{_jclAutodetect = a})
2310+
22872311-- | [Required] The fully-qualified URIs that point to your data in Google
22882312-- Cloud Storage. Each URI can contain one \'*\' wildcard character and it
22892313-- must come after the \'bucket\' name.
@@ -2333,6 +2357,7 @@ instance FromJSON JobConfigurationLoad where
23332357 <*> (o .:? "schema")
23342358 <*> (o .:? "quote" .!= "\"")
23352359 <*> (o .:? "maxBadRecords")
2360+ <*> (o .:? "autodetect")
23362361 <*> (o .:? "sourceUris" .!= mempty)
23372362 <*> (o .:? "encoding")
23382363 <*> (o .:? "fieldDelimiter"))
@@ -2357,6 +2382,7 @@ instance ToJSON JobConfigurationLoad where
23572382 ("schema" .=) <$> _jclSchema,
23582383 Just ("quote" .= _jclQuote),
23592384 ("maxBadRecords" .=) <$> _jclMaxBadRecords,
2385+ ("autodetect" .=) <$> _jclAutodetect,
23602386 ("sourceUris" .=) <$> _jclSourceURIs,
23612387 ("encoding" .=) <$> _jclEncoding,
23622388 ("fieldDelimiter" .=) <$> _jclFieldDelimiter])
@@ -3600,11 +3626,11 @@ jcqFlattenResults
36003626
36013627-- | [Experimental] Specifies whether to use BigQuery\'s legacy SQL dialect
36023628-- for this query. The default value is true. If set to false, the query
3603−-- will use BigQuery\'s updated SQL dialect with improved standards
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.
3629+-- will use BigQuery\'s standard SQL:
3630+-- https:\/\/cloud.google.com\/bigquery\/sql-reference\/ When useLegacySql
3631+-- is set to false, the values of allowLargeResults and flattenResults are
3632+-- ignored; query will be run as if allowLargeResults is true and
3633+-- flattenResults is false.
36083634jcqUseLegacySQL :: Lens' JobConfigurationQuery (Maybe Bool)
36093635jcqUseLegacySQL
36103636 = lens _jcqUseLegacySQL
@@ -3658,6 +3684,53 @@ instance ToJSON JobConfigurationQuery where
36583684 ("useLegacySql" .=) <$> _jcqUseLegacySQL,
36593685 ("defaultDataset" .=) <$> _jcqDefaultDataSet])
36603686
3687+--
3688+-- /See:/ 'googleSheetsOptions' smart constructor.
3689+newtype GoogleSheetsOptions = GoogleSheetsOptions'
3690+ { _gsoSkipLeadingRows :: Maybe (Textual Int64)
3691+ } deriving (Eq,Show,Data,Typeable,Generic)
3692+
3693+-- | Creates a value of 'GoogleSheetsOptions' with the minimum fields required to make a request.
3694+--
3695+-- Use one of the following lenses to modify other fields as desired:
3696+--
3697+-- * 'gsoSkipLeadingRows'
3698+googleSheetsOptions
3699+ :: GoogleSheetsOptions
3700+googleSheetsOptions =
3701+ GoogleSheetsOptions'
3702+ { _gsoSkipLeadingRows = Nothing
3703+ }
3704+
3705+-- | [Optional] The number of rows at the top of a sheet that BigQuery will
3706+-- skip when reading the data. The default value is 0. This property is
3707+-- useful if you have header rows that should be skipped. When autodetect
3708+-- is on, behavior is the following: * skipLeadingRows unspecified -
3709+-- Autodetect tries to detect headers in the first row. If they are not
3710+-- detected, the row is read as data. Otherwise data is read starting from
3711+-- the second row. * skipLeadingRows is 0 - Instructs autodetect that there
3712+-- are no headers and data should be read starting from the first row. *
3713+-- skipLeadingRows = N > 0 - Autodetect skips N-1 rows and tries to detect
3714+-- headers in row N. If headers are not detected, row N is just skipped.
3715+-- Otherwise row N is used to extract column names for the detected schema.
3716+gsoSkipLeadingRows :: Lens' GoogleSheetsOptions (Maybe Int64)
3717+gsoSkipLeadingRows
3718+ = lens _gsoSkipLeadingRows
3719+ (\ s a -> s{_gsoSkipLeadingRows = a})
3720+ . mapping _Coerce
3721+
3722+instance FromJSON GoogleSheetsOptions where
3723+ parseJSON
3724+ = withObject "GoogleSheetsOptions"
3725+ (\ o ->
3726+ GoogleSheetsOptions' <$> (o .:? "skipLeadingRows"))
3727+
3728+instance ToJSON GoogleSheetsOptions where
3729+ toJSON GoogleSheetsOptions'{..}
3730+ = object
3731+ (catMaybes
3732+ [("skipLeadingRows" .=) <$> _gsoSkipLeadingRows])
3733+
36613734--
36623735-- /See:/ 'tableDataInsertAllRequestRowsItem' smart constructor.
36633736data TableDataInsertAllRequestRowsItem = TableDataInsertAllRequestRowsItem'
@@ -4296,6 +4369,7 @@ data Table = Table'
42964369 , _tabView :: !(Maybe ViewDefinition)
42974370 , _tabId :: !(Maybe Text)
42984371 , _tabType :: !(Maybe Text)
4372+ , _tabNumLongTermBytes :: !(Maybe (Textual Int64))
42994373 , _tabExpirationTime :: !(Maybe (Textual Int64))
43004374 , _tabDescription :: !(Maybe Text)
43014375 } deriving (Eq,Show,Data,Typeable,Generic)
@@ -4338,6 +4412,8 @@ data Table = Table'
43384412--
43394413-- * 'tabType'
43404414--
4415+-- * 'tabNumLongTermBytes'
4416+--
43414417-- * 'tabExpirationTime'
43424418--
43434419-- * 'tabDescription'
@@ -4362,6 +4438,7 @@ table =
43624438 , _tabView = Nothing
43634439 , _tabId = Nothing
43644440 , _tabType = Nothing
4441+ , _tabNumLongTermBytes = Nothing
43654442 , _tabExpirationTime = Nothing
43664443 , _tabDescription = Nothing
43674444 }
@@ -4471,6 +4548,14 @@ tabId = lens _tabId (\ s a -> s{_tabId = a})
44714548tabType :: Lens' Table (Maybe Text)
44724549tabType = lens _tabType (\ s a -> s{_tabType = a})
44734550
4551+-- | [Output-only] The number of bytes in the table that are considered
4552+-- \"long-term storage\".
4553+tabNumLongTermBytes :: Lens' Table (Maybe Int64)
4554+tabNumLongTermBytes
4555+ = lens _tabNumLongTermBytes
4556+ (\ s a -> s{_tabNumLongTermBytes = a})
4557+ . mapping _Coerce
4558+
44744559-- | [Optional] The time when this table expires, in milliseconds since the
44754560-- epoch. If not present, the table will persist indefinitely. Expired
44764561-- tables will be deleted and their storage reclaimed.
@@ -4507,6 +4592,7 @@ instance FromJSON Table where
45074592 <*> (o .:? "view")
45084593 <*> (o .:? "id")
45094594 <*> (o .:? "type")
4595+ <*> (o .:? "numLongTermBytes")
45104596 <*> (o .:? "expirationTime")
45114597 <*> (o .:? "description"))
45124598
@@ -4531,6 +4617,7 @@ instance ToJSON Table where
45314617 ("numRows" .=) <$> _tabNumRows,
45324618 ("view" .=) <$> _tabView, ("id" .=) <$> _tabId,
45334619 ("type" .=) <$> _tabType,
4620+ ("numLongTermBytes" .=) <$> _tabNumLongTermBytes,
45344621 ("expirationTime" .=) <$> _tabExpirationTime,
45354622 ("description" .=) <$> _tabDescription])
45364623
@@ -4605,7 +4692,7 @@ instance ToJSON ErrorProto where
46054692--
46064693-- /See:/ 'csvOptions' smart constructor.
46074694data CSVOptions = CSVOptions'
4608− { _coSkipLeadingRows :: !(Maybe (Textual Int32))
4695+ { _coSkipLeadingRows :: !(Maybe (Textual Int64))
46094696 , _coAllowJaggedRows :: !(Maybe Bool)
46104697 , _coAllowQuotedNewlines :: !(Maybe Bool)
46114698 , _coQuote :: !Text
@@ -4643,7 +4730,7 @@ csvOptions =
46434730-- | [Optional] The number of rows at the top of a CSV file that BigQuery
46444731-- will skip when reading the data. The default value is 0. This property
46454732-- is useful if you have header rows in the file that should be skipped.
4646−coSkipLeadingRows :: Lens' CSVOptions (Maybe Int32)
4733+coSkipLeadingRows :: Lens' CSVOptions (Maybe Int64)
46474734coSkipLeadingRows
46484735 = lens _coSkipLeadingRows
46494736 (\ s a -> s{_coSkipLeadingRows = a})