on develop help sign in
Adding service configurations
7e1714bBrendan Hay
gen/annex/adsense.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "adsense"
2}
3}
3
4
gen/annex/adsensehost.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "adsense-host"
2}
3}
3
4
gen/annex/analytics.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "analytics"
2}
3}
3
4
gen/annex/androidenterprise.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "android-enterprise"
2}
3}
3
4
gen/annex/androidpublisher.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "android-publisher"
2}
3}
3
4
gen/annex/appengine.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "appengine"
2}
3}
3
4
gen/annex/appsactivity.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "appsactivity"
2}
3}
3
4
gen/annex/appstate.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "appstate"
2}
3}
3
4
gen/annex/autoscaler.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "autoscaler"
2}
3}
3
4
gen/annex/bigquery.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "bigquery"
2}
3}
3
4
gen/annex/blogger.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "blogger"
2}
3}
3
4
gen/annex/books.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "books"
2}
3}
3
4
gen/annex/calendar.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "calendar"
2}
3}
3
4
gen/annex/civicinfo.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "civic-info"
2}
3}
3
4
gen/annex/classroom.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "classroom"
2}
3}
3
4
gen/annex/cloudbilling.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "cloud-billing"
2}
3}
3
4
gen/annex/clouddebugger.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "cloud-debugger"
2}
3}
3
4
gen/annex/cloudlatencytest.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "cloud-latency-test"
2}
3}
3
4
gen/annex/cloudmonitoring.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "cloud-monitoring"
2}
3}
3
4
gen/annex/cloudresourcemanager.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "cloud-resource-manager"
2}
3}
3
4
gen/annex/clouduseraccounts.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "cloud-user-accounts"
2}
3}
3
4
gen/annex/compute.json+2−1
@@ -1,4 +1,5 @@
1{
1{
2− "library": "gozen-compute"
2+ "library": "compute",
3+ "canonicalName": "Compute"
3}
4}
4
5
gen/annex/container.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "container"
2}
3}
3
4
gen/annex/content.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "content"
2}
3}
3
4
gen/annex/coordinate.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "maps-coordinate"
2}
3}
3
4
gen/annex/customsearch.json+1−1
@@ -1,3 +1,3 @@
1{
1{
2+ "library": "custom-search"
2}
3}
3−
gen/annex/dataflow.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "dataflow"
2}
3}
3
4
gen/annex/datastore.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "cloud-datastore"
2}
3}
3
4
gen/annex/deploymentmanager.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "cloud-deployment-manager"
2}
3}
3
4
gen/annex/dfareporting.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "dfa-reporting"
2}
3}
3
4
gen/annex/discovery.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "discovery"
2}
3}
3
4
gen/annex/dns.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "cloud-dns"
2}
3}
3
4
gen/annex/doubleclickbidmanager.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "doubleclick-bid-manager"
2}
3}
3
4
gen/annex/doubleclicksearch.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "doubleclick-search"
2}
3}
3
4
gen/annex/drive.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "drive"
2}
3}
3
4
gen/annex/fitness.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "fitness"
2}
3}
3
4
gen/annex/freebase.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "freebase-search"
2}
3}
3
4
gen/annex/fusiontables.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "fusion-tables"
2}
3}
3
4
gen/annex/games.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "games"
2}
3}
3
4
gen/annex/gamesconfiguration.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "games-configuration"
2}
3}
3
4
gen/annex/gamesmanagement.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "games-management"
2}
3}
3
4
gen/annex/gan.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "affiliate-network"
2}
3}
3
4
gen/annex/genomics.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "genomics"
2}
3}
3
4
gen/annex/gmail.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "gmail"
2}
3}
3
4
gen/annex/groupsmigration.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "groups-migration"
2}
3}
3
4
gen/annex/groupssettings.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "groups-settings"
2}
3}
3
4
gen/annex/identitytoolkit.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "identity-toolkit"
2}
3}
3
4
gen/annex/licensing.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "licensing"
2}
3}
3
4
gen/annex/logging.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "cloud-logging"
2}
3}
3
4
gen/annex/manager.jsondeleted−3
@@ -1,3 +0,0 @@
1−{
2−}
3−
gen/annex/mapsengine.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "maps-engine"
2}
3}
3
4
gen/annex/mirror.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "mirror"
2}
3}
3
4
gen/annex/oauth2.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "oauth2"
2}
3}
3
4
gen/annex/pagespeedonline.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "pagespeed"
2}
3}
3
4
gen/annex/partners.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "partners"
2}
3}
3
4
gen/annex/playmoviespartner.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "play-movies-partner"
2}
3}
3
4
gen/annex/plus.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "plus"
2}
3}
3
4
gen/annex/plusdomains.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "plus-domains"
2}
3}
3
4
gen/annex/prediction.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "prediction"
2}
3}
3
4
gen/annex/proximitybeacon.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "proximity-beacon"
2}
3}
3
4
gen/annex/pubsub.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "cloud-pubsub"
2}
3}
3
4
gen/annex/qpxexpress.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "qpx-express"
2}
3}
3
4
gen/annex/replicapool.json+1−1
@@ -1,3 +1,3 @@
1{
1{
2+ "library": "replicapool"
2}
3}
3−
gen/annex/replicapoolupdater.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "replicapool-updater"
2}
3}
3
4
gen/annex/reseller.json+1−1
@@ -1,3 +1,3 @@
1{
1{
2+ "library": "reseller"
2}
3}
3−
gen/annex/resourceviews.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "resourceviews"
2}
3}
3
4
gen/annex/siteverification.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "site-verification"
2}
3}
3
4
gen/annex/spectrum.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "spectrum"
2}
3}
3
4
gen/annex/sqladmin.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "cloud-sqladmin"
2}
3}
3
4
gen/annex/storage.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "storage"
2}
3}
3
4
gen/annex/storagetransfer.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "storage-transfer"
2}
3}
3
4
gen/annex/tagmanager.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "tagmanager"
2}
3}
3
4
gen/annex/taskqueue.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "taskqueue"
2}
3}
3
4
gen/annex/tasks.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "tasks"
2}
3}
3
4
gen/annex/translate.json+1−1
@@ -1,4 +1,4 @@
1{
1{
2− "library": "gozen-translate"
2+ "library": "translate"
3}
3}
4
4
gen/annex/urlshortener.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "urlshortener"
2}
3}
3
4
gen/annex/webfonts.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "webfonts"
2}
3}
3
4
gen/annex/webmasters.json+1
@@ -1,3 +1,4 @@
1{
1{
2+ "library": "webmaster-tools"
2}
3}
3
4
gen/annex/youtube.json+1−1
@@ -1,4 +1,4 @@
1{
1{
2− "library": "gozen-youtube"
2+ "library": "youtube"
3}
3}
4
4
gen/annex/youtubeanalytics.json+1−1
@@ -1,4 +1,4 @@
1{
1{
2− "library": "gozen-youtube-analytics"
2+ "library": "youtube-analytics"
3}
3}
4
4
gen/src/Gen/AST.hs−15
@@ -134,21 +134,6 @@ flatten svc = svc { _svcSchemas = execState run mempty }
134 -- FIXME:
134 -- FIXME:
135 Just e -> error $ "Already exists: " ++ show (n, e, x)
135 Just e -> error $ "Already exists: " ++ show (n, e, x)
136
136
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−
152data PP
137data PP
153 = Indent
138 = Indent
154 | Print
139 | Print
gen/src/Gen/Types.hs+22−5
@@ -34,11 +34,10 @@ import Control.Applicative
34import Control.Lens hiding ((.=))
34import Control.Lens hiding ((.=))
35import Data.Aeson hiding (Bool, String)
35import Data.Aeson hiding (Bool, String)
36import Data.Aeson.TH
36import Data.Aeson.TH
37−import Data.Bifunctor
38import Data.Char
37import Data.Char
39import Data.Function (on)
38import Data.Function (on)
40−import qualified Data.HashMap.Strict as Map
41import qualified Data.HashSet as Set
39import qualified Data.HashSet as Set
40+import Data.List (groupBy)
42import Data.List.NonEmpty (NonEmpty (..))
41import Data.List.NonEmpty (NonEmpty (..))
43import qualified Data.List.NonEmpty as NE
42import qualified Data.List.NonEmpty as NE
44import Data.Maybe
43import Data.Maybe
@@ -48,10 +47,11 @@ import Data.Text (Text)
48import qualified Data.Text as Text
47import qualified Data.Text as Text
49import qualified Data.Text.Lazy as LText
48import qualified Data.Text.Lazy as LText
50import qualified Data.Text.Lazy.Builder as Build
49import qualified Data.Text.Lazy.Builder as Build
50+import Data.Text.Manipulate
51import qualified Data.Text.Read as Read
51import qualified Data.Text.Read as Read
52import qualified Filesystem.Path.CurrentOS as Path
52import qualified Filesystem.Path.CurrentOS as Path
53import Formatting
53import Formatting
54−import Gen.Orphans
54+import Gen.Orphans ()
55import Gen.Text
55import Gen.Text
56import Gen.Types.Help
56import Gen.Types.Help
57import Gen.Types.Id
57import Gen.Types.Id
@@ -400,7 +400,9 @@ instance ToJSON (Service Data API) where
400 ]
400 ]
401
401
402svcAbbrev :: Service s r -> Text
402svcAbbrev :: Service s r -> Text
403+svcAbbrev s = upperHead
404+ . renameAbbrev
403−svcAbbrev s = renameAbbrev $ fromMaybe (_svcTitle s) (_svcCanonicalName s)
405+ $ fromMaybe (_svcTitle s) (_svcCanonicalName s)
404
406
405typeImports, prodImports, sumImports :: Service s r -> [NS]
407typeImports, prodImports, sumImports :: Service s r -> [NS]
406typeImports s = ["Network.Google.Prelude", prodNS s, sumNS s]
408typeImports s = ["Network.Google.Prelude", prodNS s, sumNS s]
@@ -409,7 +411,7 @@ sumImports _ = ["Network.Google.Prelude"]
409
411
410tocNS, typesNS, prodNS, sumNS :: Service s r -> NS
412tocNS, typesNS, prodNS, sumNS :: Service s r -> NS
411tocNS s = NS ["Network", "Google", svcAbbrev s]
413tocNS s = NS ["Network", "Google", svcAbbrev s]
412−typesNS = (<> "Types") . tocNS
414+typesNS = (<> "Types") . tocNS
413prodNS = (<> "Product") . typesNS
415prodNS = (<> "Product") . typesNS
414sumNS = (<> "Sum") . typesNS
416sumNS = (<> "Sum") . typesNS
415
417
@@ -436,3 +438,18 @@ instance ToJSON Library where
436 , "exposedModules" .= concatMap exposedModules (NE.toList _libServices)
438 , "exposedModules" .= concatMap exposedModules (NE.toList _libServices)
437 , "otherModules" .= concatMap otherModules (NE.toList _libServices)
439 , "otherModules" .= concatMap otherModules (NE.toList _libServices)
438 ]
440 ]
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
7license-file: LICENSE
7license-file: LICENSE
8author: Brendan Hay
8author: Brendan Hay
9maintainer: Brendan Hay <brendan.g.hay@gmail.com>
9maintainer: Brendan Hay <brendan.g.hay@gmail.com>
10−copyright: Copyright (c) 2013-2015 Brendan Hay
10+copyright: Copyright (c) 2015 Brendan Hay
11−category: Network, Google, Cloud, Distributed Computing
11+category: Network, Google, Cloud
12build-type: Simple
12build-type: Simple
13cabal-version: >= 1.10
13cabal-version: >= 1.10
14extra-source-files: README.md
14extra-source-files: README.md