on develop help sign in
Adding service configurations
commit7e1714b8bae1f7b1df2924a6e948864c8948adee authorBrendan Hay <brendan.g.hay@gmail.com> dateFri 25 Sep 2015, 19:12 (11 years ago) parent8b84ac5
83 files changed+104−32
gen/annex/adsense.json+1 gen/annex/adsensehost.json+1 gen/annex/analytics.json+1 gen/annex/androidenterprise.json+1 gen/annex/androidpublisher.json+1 gen/annex/appengine.json+1 gen/annex/appsactivity.json+1 gen/annex/appstate.json+1 gen/annex/autoscaler.json+1 gen/annex/bigquery.json+1 gen/annex/blogger.json+1 gen/annex/books.json+1 gen/annex/calendar.json+1 gen/annex/civicinfo.json+1 gen/annex/classroom.json+1 gen/annex/cloudbilling.json+1 gen/annex/clouddebugger.json+1 gen/annex/cloudlatencytest.json+1 gen/annex/cloudmonitoring.json+1 gen/annex/cloudresourcemanager.json+1 gen/annex/clouduseraccounts.json+1 gen/annex/compute.json+2−1 gen/annex/container.json+1 gen/annex/content.json+1 gen/annex/coordinate.json+1 gen/annex/customsearch.json+1−1 gen/annex/dataflow.json+1 gen/annex/datastore.json+1 gen/annex/deploymentmanager.json+1 gen/annex/dfareporting.json+1 gen/annex/discovery.json+1 gen/annex/dns.json+1 gen/annex/doubleclickbidmanager.json+1 gen/annex/doubleclicksearch.json+1 gen/annex/drive.json+1 gen/annex/fitness.json+1 gen/annex/freebase.json+1 gen/annex/fusiontables.json+1 gen/annex/games.json+1 gen/annex/gamesconfiguration.json+1 gen/annex/gamesmanagement.json+1 gen/annex/gan.json+1 gen/annex/genomics.json+1 gen/annex/gmail.json+1 gen/annex/groupsmigration.json+1 gen/annex/groupssettings.json+1 gen/annex/identitytoolkit.json+1 gen/annex/licensing.json+1 gen/annex/logging.json+1 gen/annex/manager.json−3 gen/annex/mapsengine.json+1 gen/annex/mirror.json+1 gen/annex/oauth2.json+1 gen/annex/pagespeedonline.json+1 gen/annex/partners.json+1 gen/annex/playmoviespartner.json+1 gen/annex/plus.json+1 gen/annex/plusdomains.json+1 gen/annex/prediction.json+1 gen/annex/proximitybeacon.json+1 gen/annex/pubsub.json+1 gen/annex/qpxexpress.json+1 gen/annex/replicapool.json+1−1 gen/annex/replicapoolupdater.json+1 gen/annex/reseller.json+1−1 gen/annex/resourceviews.json+1 gen/annex/siteverification.json+1 gen/annex/spectrum.json+1 gen/annex/sqladmin.json+1 gen/annex/storage.json+1 gen/annex/storagetransfer.json+1 gen/annex/tagmanager.json+1 gen/annex/taskqueue.json+1 gen/annex/tasks.json+1 gen/annex/translate.json+1−1 gen/annex/urlshortener.json+1 gen/annex/webfonts.json+1 gen/annex/webmasters.json+1 gen/annex/youtube.json+1−1 gen/annex/youtubeanalytics.json+1−1 gen/src/Gen/AST.hs−15 gen/src/Gen/Types.hs+22−5 gen/template/cabal.ede+2−2
gen/annex/adsense.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "adsense"
23}
34
gen/annex/adsensehost.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "adsense-host"
23}
34
gen/annex/analytics.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "analytics"
23}
34
gen/annex/androidenterprise.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "android-enterprise"
23}
34
gen/annex/androidpublisher.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "android-publisher"
23}
34
gen/annex/appengine.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "appengine"
23}
34
gen/annex/appsactivity.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "appsactivity"
23}
34
gen/annex/appstate.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "appstate"
23}
34
gen/annex/autoscaler.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "autoscaler"
23}
34
gen/annex/bigquery.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "bigquery"
23}
34
gen/annex/blogger.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "blogger"
23}
34
gen/annex/books.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "books"
23}
34
gen/annex/calendar.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "calendar"
23}
34
gen/annex/civicinfo.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "civic-info"
23}
34
gen/annex/classroom.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "classroom"
23}
34
gen/annex/cloudbilling.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "cloud-billing"
23}
34
gen/annex/clouddebugger.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "cloud-debugger"
23}
34
gen/annex/cloudlatencytest.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "cloud-latency-test"
23}
34
gen/annex/cloudmonitoring.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "cloud-monitoring"
23}
34
gen/annex/cloudresourcemanager.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "cloud-resource-manager"
23}
34
gen/annex/clouduseraccounts.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "cloud-user-accounts"
23}
34
gen/annex/compute.json+2−1
@@ -1,4 +1,5 @@
11{
2− "library": "gozen-compute"
2+ "library": "compute",
3+ "canonicalName": "Compute"
34}
45
gen/annex/container.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "container"
23}
34
gen/annex/content.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "content"
23}
34
gen/annex/coordinate.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "maps-coordinate"
23}
34
gen/annex/customsearch.json+1−1
@@ -1,3 +1,3 @@
11{
2+ "library": "custom-search"
23}
3−
gen/annex/dataflow.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "dataflow"
23}
34
gen/annex/datastore.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "cloud-datastore"
23}
34
gen/annex/deploymentmanager.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "cloud-deployment-manager"
23}
34
gen/annex/dfareporting.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "dfa-reporting"
23}
34
gen/annex/discovery.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "discovery"
23}
34
gen/annex/dns.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "cloud-dns"
23}
34
gen/annex/doubleclickbidmanager.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "doubleclick-bid-manager"
23}
34
gen/annex/doubleclicksearch.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "doubleclick-search"
23}
34
gen/annex/drive.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "drive"
23}
34
gen/annex/fitness.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "fitness"
23}
34
gen/annex/freebase.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "freebase-search"
23}
34
gen/annex/fusiontables.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "fusion-tables"
23}
34
gen/annex/games.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "games"
23}
34
gen/annex/gamesconfiguration.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "games-configuration"
23}
34
gen/annex/gamesmanagement.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "games-management"
23}
34
gen/annex/gan.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "affiliate-network"
23}
34
gen/annex/genomics.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "genomics"
23}
34
gen/annex/gmail.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "gmail"
23}
34
gen/annex/groupsmigration.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "groups-migration"
23}
34
gen/annex/groupssettings.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "groups-settings"
23}
34
gen/annex/identitytoolkit.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "identity-toolkit"
23}
34
gen/annex/licensing.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "licensing"
23}
34
gen/annex/logging.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "cloud-logging"
23}
34
gen/annex/manager.jsondeleted−3
@@ -1,3 +0,0 @@
1−{
2−}
3−
gen/annex/mapsengine.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "maps-engine"
23}
34
gen/annex/mirror.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "mirror"
23}
34
gen/annex/oauth2.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "oauth2"
23}
34
gen/annex/pagespeedonline.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "pagespeed"
23}
34
gen/annex/partners.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "partners"
23}
34
gen/annex/playmoviespartner.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "play-movies-partner"
23}
34
gen/annex/plus.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "plus"
23}
34
gen/annex/plusdomains.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "plus-domains"
23}
34
gen/annex/prediction.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "prediction"
23}
34
gen/annex/proximitybeacon.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "proximity-beacon"
23}
34
gen/annex/pubsub.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "cloud-pubsub"
23}
34
gen/annex/qpxexpress.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "qpx-express"
23}
34
gen/annex/replicapool.json+1−1
@@ -1,3 +1,3 @@
11{
2+ "library": "replicapool"
23}
3−
gen/annex/replicapoolupdater.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "replicapool-updater"
23}
34
gen/annex/reseller.json+1−1
@@ -1,3 +1,3 @@
11{
2+ "library": "reseller"
23}
3−
gen/annex/resourceviews.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "resourceviews"
23}
34
gen/annex/siteverification.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "site-verification"
23}
34
gen/annex/spectrum.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "spectrum"
23}
34
gen/annex/sqladmin.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "cloud-sqladmin"
23}
34
gen/annex/storage.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "storage"
23}
34
gen/annex/storagetransfer.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "storage-transfer"
23}
34
gen/annex/tagmanager.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "tagmanager"
23}
34
gen/annex/taskqueue.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "taskqueue"
23}
34
gen/annex/tasks.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "tasks"
23}
34
gen/annex/translate.json+1−1
@@ -1,4 +1,4 @@
11{
2− "library": "gozen-translate"
2+ "library": "translate"
33}
44
gen/annex/urlshortener.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "urlshortener"
23}
34
gen/annex/webfonts.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "webfonts"
23}
34
gen/annex/webmasters.json+1
@@ -1,3 +1,4 @@
11{
2+ "library": "webmaster-tools"
23}
34
gen/annex/youtube.json+1−1
@@ -1,4 +1,4 @@
11{
2− "library": "gozen-youtube"
2+ "library": "youtube"
33}
44
gen/annex/youtubeanalytics.json+1−1
@@ -1,4 +1,4 @@
11{
2− "library": "gozen-youtube-analytics"
2+ "library": "youtube-analytics"
33}
44
gen/src/Gen/AST.hs−15
@@ -134,21 +134,6 @@ flatten svc = svc { _svcSchemas = execState run mempty }
134134 -- FIXME:
135135 Just e -> error $ "Already exists: " ++ show (n, e, x)
136136
137−merge :: Versions -> [Service Data API] -> [Library]
138−merge v = map go . groupBy (on (==) _svcLibrary)
139− where
140− go [x] = mk x
141− go (x:xs) = (mk x) { _libServices = x :| xs }
142− -- FIXME:
143− go [] = error "Empty merge set!"
144−
145− mk x = Library
146− { _libName = _svcLibrary x
147− , _libTitle = renameTitle (_svcTitle x)
148− , _libVersions = v
149− , _libServices = x :| []
150− }
151−
152137data PP
153138 = Indent
154139 | Print
gen/src/Gen/Types.hs+22−5
@@ -34,11 +34,10 @@ import Control.Applicative
3434import Control.Lens hiding ((.=))
3535import Data.Aeson hiding (Bool, String)
3636import Data.Aeson.TH
37−import Data.Bifunctor
3837import Data.Char
3938import Data.Function (on)
40−import qualified Data.HashMap.Strict as Map
4139import qualified Data.HashSet as Set
40+import Data.List (groupBy)
4241import Data.List.NonEmpty (NonEmpty (..))
4342import qualified Data.List.NonEmpty as NE
4443import Data.Maybe
@@ -48,10 +47,11 @@ import Data.Text (Text)
4847import qualified Data.Text as Text
4948import qualified Data.Text.Lazy as LText
5049import qualified Data.Text.Lazy.Builder as Build
50+import Data.Text.Manipulate
5151import qualified Data.Text.Read as Read
5252import qualified Filesystem.Path.CurrentOS as Path
5353import Formatting
54−import Gen.Orphans
54+import Gen.Orphans ()
5555import Gen.Text
5656import Gen.Types.Help
5757import Gen.Types.Id
@@ -400,7 +400,9 @@ instance ToJSON (Service Data API) where
400400 ]
401401
402402svcAbbrev :: Service s r -> Text
403−svcAbbrev s = renameAbbrev $ fromMaybe (_svcTitle s) (_svcCanonicalName s)
403+svcAbbrev s = upperHead
404+ . renameAbbrev
405+ $ fromMaybe (_svcTitle s) (_svcCanonicalName s)
404406
405407typeImports, prodImports, sumImports :: Service s r -> [NS]
406408typeImports s = ["Network.Google.Prelude", prodNS s, sumNS s]
@@ -409,7 +411,7 @@ sumImports _ = ["Network.Google.Prelude"]
409411
410412tocNS, typesNS, prodNS, sumNS :: Service s r -> NS
411413tocNS s = NS ["Network", "Google", svcAbbrev s]
412−typesNS = (<> "Types") . tocNS
414+typesNS = (<> "Types") . tocNS
413415prodNS = (<> "Product") . typesNS
414416sumNS = (<> "Sum") . typesNS
415417
@@ -436,3 +438,18 @@ instance ToJSON Library where
436438 , "exposedModules" .= concatMap exposedModules (NE.toList _libServices)
437439 , "otherModules" .= concatMap otherModules (NE.toList _libServices)
438440 ]
441+
442+merge :: Versions -> [Service Data API] -> [Library]
443+merge v = map go . groupBy (on (==) _svcLibrary)
444+ where
445+ go [x] = mk x
446+ go (x:xs) = (mk x) { _libServices = x :| xs }
447+ -- FIXME:
448+ go [] = error "Empty merge set!"
449+
450+ mk x = Library
451+ { _libName = renameLibrary (_svcLibrary x)
452+ , _libTitle = renameTitle (_svcTitle x)
453+ , _libVersions = v
454+ , _libServices = x :| []
455+ }
gen/template/cabal.ede+2−2
@@ -7,8 +7,8 @@ license: OtherLicense
77license-file: LICENSE
88author: Brendan Hay
99maintainer: Brendan Hay <brendan.g.hay@gmail.com>
10−copyright: Copyright (c) 2013-2015 Brendan Hay
11−category: Network, Google, Cloud, Distributed Computing
10+copyright: Copyright (c) 2015 Brendan Hay
11+category: Network, Google, Cloud
1212build-type: Simple
1313cabal-version: >= 1.10
1414extra-source-files: README.md