on develop help sign in
Regenerating services with JSON instances
commita5d48d5176878c196771874938f5d61efdf26159 authorBrendan Hay <brendan.g.hay@gmail.com> dateSun 27 Sep 2015, 09:37 (11 years ago) parentacd0585
186 files changed+81053−21251
core/gogol-core.cabal+3−1 core/src/Network/Google/Prelude.hs+27−12 gogol-adexchange-buyer/gen/Network/Google/AdExchange/Buyer.hs+563−445 gogol-adexchange-buyer/gen/Network/Google/AdExchange/Buyer/Types/Product.hs+1957 gogol-adexchange-seller/gen/Network/Google/AdExchange/Seller.hs+160−134 gogol-adexchange-seller/gen/Network/Google/AdExchange/Seller/Types/Product.hs+350 gogol-admin/gen/Network/Google/Admin/DataTransfer.hs+68−51 gogol-admin/gen/Network/Google/Admin/DataTransfer/Types/Product.hs+120 gogol-admin/gen/Network/Google/Admin/Directory.hs+756−591 gogol-admin/gen/Network/Google/Admin/Directory/Types/Product.hs+1033 gogol-admin/gen/Network/Google/Admin/EmailMigration.hs+12−9 gogol-admin/gen/Network/Google/Admin/EmailMigration/Types/Product.hs+29 gogol-admin/gen/Network/Google/Admin/Reports.hs+102−78 gogol-admin/gen/Network/Google/Admin/Reports/Types/Product.hs+276 gogol-adsense-host/gen/Network/Google/AdSense/Host.hs+348−292 gogol-adsense-host/gen/Network/Google/AdSense/Host/Types/Product.hs+372 gogol-adsense/gen/Network/Google/AdSense.hs+335−275 gogol-adsense/gen/Network/Google/AdSense/Types/Product.hs+583 gogol-affiliates/gen/Network/Google/Affiliates.hs+195−160 gogol-affiliates/gen/Network/Google/Affiliates/Types/Product.hs+572 gogol-analytics/gen/Network/Google/Analytics.hs+1327−1042 gogol-analytics/gen/Network/Google/Analytics/Types/Product.hs+2186 gogol-appengine-taskqueue/gen/Network/Google/AppEngine/TaskQueue.hs+124−107 gogol-appengine-taskqueue/gen/Network/Google/AppEngine/TaskQueue/Types/Product.hs+110 gogol-appengine/gen/Network/Google/AppEngine.hs+127−108 gogol-appengine/gen/Network/Google/AppEngine/Types/Product.hs+610 gogol-apps-activity/gen/Network/Google/Apps/Activity.hs+18−15 gogol-apps-activity/gen/Network/Google/Apps/Activity/Types/Product.hs+171 gogol-apps-activity/gen/Network/Google/Apps/Activity/Types/Sum.hs+24 gogol-apps-calendar/gen/Network/Google/Apps/Calendar.hs+593−460 gogol-apps-calendar/gen/Network/Google/Apps/Calendar/Types/Product.hs+738 gogol-apps-licensing/gen/Network/Google/Apps/Licensing.hs+119−92 gogol-apps-licensing/gen/Network/Google/Apps/Licensing/Types/Product.hs+50 gogol-apps-reseller/gen/Network/Google/Apps/Reseller.hs+205−156 gogol-apps-reseller/gen/Network/Google/Apps/Reseller/Types/Product.hs+232 gogol-apps-tasks/gen/Network/Google/Apps/Tasks.hs+195−146 gogol-apps-tasks/gen/Network/Google/Apps/Tasks/Types/Product.hs+108 gogol-bigquery/gen/Network/Google/BigQuery.hs+309−260 gogol-bigquery/gen/Network/Google/BigQuery/Types/Product.hs+967 gogol-billing/gen/Network/Google/Billing.hs+54−44 gogol-billing/gen/Network/Google/Billing/Types/Product.hs+66 gogol-blogger/gen/Network/Google/Blogger.hs+523−417 gogol-blogger/gen/Network/Google/Blogger/Types/Product.hs+593 gogol-books/gen/Network/Google/Books.hs+547−432 gogol-books/gen/Network/Google/Books/Types/Product.hs+1705 gogol-civicinfo/gen/Network/Google/CivicInfo.hs+67−52 gogol-civicinfo/gen/Network/Google/CivicInfo/Types/Product.hs+478 gogol-classroom/gen/Network/Google/Classroom.hs+312−263 gogol-classroom/gen/Network/Google/Classroom/Types/Product.hs+219 gogol-compute-autoscaler/gen/Network/Google/Compute/Autoscaler.hs+153−129 gogol-compute-autoscaler/gen/Network/Google/Compute/Autoscaler/Types/Product.hs+338 gogol-compute-instancegroups-manager/gen/Network/Google/Compute/InstanceGroups/Manager.hs+201−167 gogol-compute-instancegroups-manager/gen/Network/Google/Compute/InstanceGroups/Manager/Types/Product.hs+287 gogol-compute-instancegroups-manager/gen/Network/Google/Compute/InstanceGroups/Manager/Types/Sum.hs+18 gogol-compute-instancegroups-updater/gen/Network/Google/Compute/InstanceGroups/Updater.hs+169−141 gogol-compute-instancegroups-updater/gen/Network/Google/Compute/InstanceGroups/Updater/Types/Product.hs+305 gogol-compute-instancegroups/gen/Network/Google/Compute/InstanceGroups.hs+188−156 gogol-compute-instancegroups/gen/Network/Google/Compute/InstanceGroups/Types/Product.hs+302 gogol-compute-useraccounts/gen/Network/Google/Compute/UserAccounts.hs+266−224 gogol-compute-useraccounts/gen/Network/Google/Compute/UserAccounts/Types/Product.hs+360 gogol-compute-useraccounts/gen/Network/Google/Compute/UserAccounts/Types/Sum.hs+12 gogol-compute/gen/Network/Google/Compute.hs+2723−2274 gogol-compute/gen/Network/Google/Compute/Types/Product.hs+3683 gogol-compute/gen/Network/Google/Compute/Types/Sum.hs+282 gogol-container/gen/Network/Google/Container.hs+116−95 gogol-container/gen/Network/Google/Container/Types/Product.hs+189 gogol-container/gen/Network/Google/Container/Types/Sum.hs+18 gogol-customsearch/gen/Network/Google/CustomSearch.hs+90−40 gogol-customsearch/gen/Network/Google/CustomSearch/Types/Product.hs+339 gogol-dataflow/gen/Network/Google/Dataflow.hs+67−56 gogol-dataflow/gen/Network/Google/Dataflow/Types/Product.hs+1490 gogol-datastore/gen/Network/Google/Datastore.hs+76−60 gogol-datastore/gen/Network/Google/Datastore/Types/Product.hs+544 gogol-datastore/gen/Network/Google/Datastore/Types/Sum.hs+54 gogol-debugger/gen/Network/Google/Debugger.hs+127−106 gogol-debugger/gen/Network/Google/Debugger/Types/Product.hs+389 gogol-deploymentmanager/gen/Network/Google/DeploymentManager.hs+212−179 gogol-deploymentmanager/gen/Network/Google/DeploymentManager/Types/Product.hs+349 gogol-dfareporting/gen/Network/Google/DFAReporting.hs+2948−2320 gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Product.hs+4718 gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Sum.hs+588 gogol-discovery/gen/Network/Google/Discovery.hs+26−20 gogol-discovery/gen/Network/Google/Discovery/Types/Product.hs+470 gogol-dns/gen/Network/Google/DNS.hs+133−111 gogol-dns/gen/Network/Google/DNS/Types/Product.hs+168 gogol-doubleclick-bids/gen/Network/Google/DoubleClick/Bids.hs+91−71 gogol-doubleclick-bids/gen/Network/Google/DoubleClick/Bids/Types/Product.hs+337 gogol-doubleclick-bids/gen/Network/Google/DoubleClick/Bids/Types/Sum.hs+84 gogol-doubleclick-search/gen/Network/Google/DoubleClick/Search.hs+135−111 gogol-doubleclick-search/gen/Network/Google/DoubleClick/Search/Types/Product.hs+397 gogol-drive/gen/Network/Google/Drive.hs+849−661 gogol-drive/gen/Network/Google/Drive/Types/Product.hs+1065 gogol-fitness/gen/Network/Google/Fitness.hs+110−85 gogol-fitness/gen/Network/Google/Fitness/Types/Product.hs+348 gogol-fitness/gen/Network/Google/Fitness/Types/Sum.hs+24 gogol-fonts/gen/Network/Google/Fonts.hs+11−9 gogol-fonts/gen/Network/Google/Fonts/Types/Product.hs+51 gogol-freebasesearch/gen/Network/Google/Freebase/Search.hs+74−45 gogol-freebasesearch/gen/Network/Google/Freebase/Search/Types/Product.hs+81 gogol-fusiontables/gen/Network/Google/FusionTables.hs+432−363 gogol-fusiontables/gen/Network/Google/FusionTables/Types/Product.hs+463 gogol-games-appstate/gen/Network/Google/Games/AppState.hs+58−48 gogol-games-appstate/gen/Network/Google/Games/AppState/Types/Product.hs+68 gogol-games-configuration/gen/Network/Google/Games/Configuration.hs+166−127 gogol-games-configuration/gen/Network/Google/Games/Configuration/Types/Product.hs+234 gogol-games-management/gen/Network/Google/Games/Management.hs+322−259 gogol-games-management/gen/Network/Google/Games/Management/Types/Product.hs+274 gogol-games/gen/Network/Google/Games.hs+717−569 gogol-games/gen/Network/Google/Games/Types/Product.hs+2055 gogol-genomics/gen/Network/Google/Genomics.hs+567−447 gogol-genomics/gen/Network/Google/Genomics/Types/Product.hs+1469 gogol-genomics/gen/Network/Google/Genomics/Types/Sum.hs+84 gogol-gmail/gen/Network/Google/Gmail.hs+278−213 gogol-gmail/gen/Network/Google/Gmail/Types/Product.hs+358 gogol-gmail/gen/Network/Google/Gmail/Types/Sum.hs+24 gogol-groups-migration/gen/Network/Google/Groups/Migration.hs+12−10 gogol-groups-migration/gen/Network/Google/Groups/Migration/Types/Product.hs+16 gogol-groups-migration/gen/Network/Google/Groups/Settings.hs+33−27 gogol-groups-migration/gen/Network/Google/Groups/Settings/Types/Product.hs+77 gogol-identity-toolkit/gen/Network/Google/IdentityToolkit.hs+145−108 gogol-identity-toolkit/gen/Network/Google/IdentityToolkit/Types/Product.hs+632 gogol-latencytest/gen/Network/Google/LatencyTest.hs+21−16 gogol-latencytest/gen/Network/Google/LatencyTest/Types/Product.hs+88 gogol-logging/gen/Network/Google/Logging.hs+346−293 gogol-logging/gen/Network/Google/Logging/Types/Product.hs+423 gogol-maps-coordinate/gen/Network/Google/Maps/Coordinate.hs+210−176 gogol-maps-coordinate/gen/Network/Google/Maps/Coordinate/Types/Product.hs+323 gogol-maps-engine/gen/Network/Google/Map/Engine.hs+492−375 gogol-maps-engine/gen/Network/Google/Map/Engine/Types/Product.hs+1296 gogol-maps-engine/gen/Network/Google/Map/Engine/Types/Sum.hs+204 gogol-mirror/gen/Network/Google/Mirror.hs+205−159 gogol-mirror/gen/Network/Google/Mirror/Types/Product.hs+401 gogol-monitoring/gen/Network/Google/Monitoring.hs+102−82 gogol-monitoring/gen/Network/Google/Monitoring/Types/Product.hs+356 gogol-oauth2/gen/Network/Google/OAuth2.hs+10−8 gogol-oauth2/gen/Network/Google/OAuth2/Types/Product.hs+85 gogol-pagespeed/gen/Network/Google/PageSpeed.hs+16−14 gogol-pagespeed/gen/Network/Google/PageSpeed/Types/Product.hs+239 gogol-partners/gen/Network/Google/Partners.hs+88−73 gogol-partners/gen/Network/Google/Partners/Types/Product.hs+442 gogol-play-developer/gen/Network/Google/Play/Developer.hs+739−622 gogol-play-developer/gen/Network/Google/Play/Developer/Types/Product.hs+738 gogol-play-enterprise/gen/Network/Google/Play/Enterprise.hs+707−584 gogol-play-enterprise/gen/Network/Google/Play/Enterprise/Types/Product.hs+562 gogol-play-moviespartner/gen/Network/Google/Play/Movies/Partner.hs+141−119 gogol-play-moviespartner/gen/Network/Google/Play/Movies/Partner/Types/Product.hs+313 gogol-plus-domains/gen/Network/Google/PlusDomains.hs+262−218 gogol-plus-domains/gen/Network/Google/PlusDomains/Types/Product.hs+1063 gogol-plus/gen/Network/Google/Plus.hs+159−127 gogol-plus/gen/Network/Google/Plus/Types/Product.hs+1008 gogol-prediction/gen/Network/Google/Prediction.hs+108−92 gogol-prediction/gen/Network/Google/Prediction/Types/Product.hs+430 gogol-proximitybeacon/gen/Network/Google/ProximityBeacon.hs+121−104 gogol-proximitybeacon/gen/Network/Google/ProximityBeacon/Types/Product.hs+287 gogol-pubsub/gen/Network/Google/PubSub.hs+193−171 gogol-pubsub/gen/Network/Google/PubSub/Types/Product.hs+291 gogol-qpxexpress/gen/Network/Google/QPXExpress.hs+12−8 gogol-qpxexpress/gen/Network/Google/QPXExpress/Types/Product.hs+517 gogol-resourcemanager/gen/Network/Google/ResourceManager.hs+249−220 gogol-resourcemanager/gen/Network/Google/ResourceManager/Types/Product.hs+181 gogol-shopping-content/gen/Network/Google/Shopping/Content.hs+207−176 gogol-shopping-content/gen/Network/Google/Shopping/Content/Types/Product.hs+1107 gogol-siteverification/gen/Network/Google/SiteVerification.hs+82−61 gogol-siteverification/gen/Network/Google/SiteVerification/Types/Product.hs+103 gogol-spectrum/gen/Network/Google/Spectrum.hs+72−51 gogol-spectrum/gen/Network/Google/Spectrum/Types/Product.hs+610 gogol-sqladmin/gen/Network/Google/SQLAdmin.hs+536−446 gogol-sqladmin/gen/Network/Google/SQLAdmin/Types/Product.hs+845 gogol-storage-transfer/gen/Network/Google/Storage/Transfer.hs+194−166 gogol-storage-transfer/gen/Network/Google/Storage/Transfer/Types/Product.hs+447 gogol-storage/gen/Network/Google/Storage.hs+557−445 gogol-storage/gen/Network/Google/Storage/Types/Product.hs+463 gogol-tagmanager/gen/Network/Google/TagManager.hs+606−511 gogol-tagmanager/gen/Network/Google/TagManager/Types/Product.hs+624 gogol-tagmanager/gen/Network/Google/TagManager/Types/Sum.hs+48 gogol-translate/gen/Network/Google/Translate.hs+42−31 gogol-translate/gen/Network/Google/Translate/Types/Product.hs+84 gogol-urlshortener/gen/Network/Google/URLShortener.hs+35−28 gogol-urlshortener/gen/Network/Google/URLShortener/Types/Product.hs+97 gogol-webmaster-tools/gen/Network/Google/Webmaster/Tools.hs+175−142 gogol-webmaster-tools/gen/Network/Google/Webmaster/Tools/Types/Product.hs+268 gogol-youtube-analytics/gen/Network/Google/YouTube/Analytics.hs+140−107 gogol-youtube-analytics/gen/Network/Google/YouTube/Analytics/Types/Product.hs+249 gogol-youtube/gen/Network/Google/YouTube.hs+971−753 gogol-youtube/gen/Network/Google/YouTube/Types/Product.hs+3184 gogol-youtube/gen/Network/Google/YouTube/Types/Sum.hs+702
core/gogol-core.cabal+3−1
@@ -41,10 +41,12 @@ library
4141 other-modules:
4242
4343 build-depends:
44− base >= 4.7 && < 5
44+ aeson
45+ , base >= 4.7 && < 5
4546 , hashable
4647 , lens
4748 , servant
49+ , servant-client
4850 , text
4951
5052 if !impl(ghc>=7.9)
core/src/Network/Google/Prelude.hs+27−12
@@ -9,23 +9,32 @@
99module Network.Google.Prelude
1010 ( module Export
1111
12− -- * Isos
12+ -- * Serialisation
13+ , parseJSONText
14+ , toJSONText
15+
16+ -- * Isos
1317 , _Coerce
1418 , _Default
1519 ) where
1620
17−import Control.Lens as Export (Lens', lens)
18−import Control.Lens hiding (coerce)
21+import Control.Lens as Export (Lens', lens)
22+import Control.Lens hiding (coerce)
23+import Data.Aeson as Export
24+import Data.Aeson.Types
1925import Data.Coerce
20−import Data.Data as Export (Data, Typeable)
21−import Data.Hashable as Export
22−import Data.Int as Export (Int32, Int64)
23−import Data.Text as Export (Text)
24−import Data.Time as Export (UTCTime)
25−import Data.Word as Export (Word32, Word64, Word8)
26−import GHC.Generics as Export (Generic)
27−import Numeric.Natural as Export (Natural)
28−import Servant.API as Export
26+import Data.Data as Export (Data, Typeable)
27+import Data.Hashable as Export
28+import Data.Int as Export (Int32, Int64)
29+import Data.Maybe as Export
30+import Data.Proxy as Export
31+import Data.Text as Export (Text)
32+import Data.Time as Export (UTCTime)
33+import Data.Word as Export (Word32, Word64, Word8)
34+import GHC.Generics as Export (Generic)
35+import Numeric.Natural as Export (Natural)
36+import Servant.API as Export
37+import Servant.Client as Export
2938
3039_Coerce :: (Coercible a b, Coercible b a) => Iso' a b
3140_Coerce = iso coerce coerce
@@ -37,3 +46,9 @@ _Default = iso f Just
3746 where
3847 f (Just x) = x
3948 f Nothing = mempty
49+
50+parseJSONText :: FromText a => String -> Value -> Parser a
51+parseJSONText n = withText n (maybe (fail n) pure . fromText)
52+
53+toJSONText :: ToText a => a -> Value
54+toJSONText = String . toText
gogol-adexchange-buyer/gen/Network/Google/AdExchange/Buyer.hs+563−445
@@ -931,59 +931,70 @@ type MarketplacenotesAPI =
931931
932932-- | Add notes to the order
933933type MarketplacenotesInsert =
934− "adexchangebuyer" :> "v1.4" :> "marketplaceOrders" :>
935− Capture "orderId" Text
936− :> "notes"
937− :> "insert"
938− :> QueryParam "quotaUser" Text
939− :> QueryParam "prettyPrint" Bool
940− :> QueryParam "userIp" Text
941− :> QueryParam "key" Text
942− :> QueryParam "oauth_token" Text
943− :> QueryParam "fields" Text
944− :> QueryParam "alt" Text
934+ "adexchangebuyer" :>
935+ "v1.4" :>
936+ "marketplaceOrders" :>
937+ Capture "orderId" Text :>
938+ "notes" :>
939+ "insert" :>
940+ QueryParam "quotaUser" Text :>
941+ QueryParam "prettyPrint" Bool :>
942+ QueryParam "userIp" Text :>
943+ QueryParam "key" Text :>
944+ QueryParam "oauth_token" Text :>
945+ QueryParam "fields" Text :>
946+ QueryParam "alt" Text :>
947+ Post '[JSON] AddOrderNotesResponse
945948
946949-- | Get all the notes associated with an order
947950type MarketplacenotesList =
948− "adexchangebuyer" :> "v1.4" :> "marketplaceOrders" :>
949− Capture "orderId" Text
950− :> "notes"
951− :> QueryParam "quotaUser" Text
952− :> QueryParam "prettyPrint" Bool
953− :> QueryParam "userIp" Text
954− :> QueryParam "key" Text
955− :> QueryParam "oauth_token" Text
956− :> QueryParam "fields" Text
957− :> QueryParam "alt" Text
951+ "adexchangebuyer" :>
952+ "v1.4" :>
953+ "marketplaceOrders" :>
954+ Capture "orderId" Text :>
955+ "notes" :>
956+ QueryParam "quotaUser" Text :>
957+ QueryParam "prettyPrint" Bool :>
958+ QueryParam "userIp" Text :>
959+ QueryParam "key" Text :>
960+ QueryParam "oauth_token" Text :>
961+ QueryParam "fields" Text :>
962+ QueryParam "alt" Text :>
963+ Get '[JSON] GetOrderNotesResponse
958964
959965type DealsAPI = DealsGet
960966
961967-- | Gets the requested deal.
962968type DealsGet =
963− "adexchangebuyer" :> "v1.4" :> "deals" :>
964− Capture "dealId" Int64
965− :> QueryParam "quotaUser" Text
966− :> QueryParam "prettyPrint" Bool
967− :> QueryParam "userIp" Text
968− :> QueryParam "key" Text
969− :> QueryParam "oauth_token" Text
970− :> QueryParam "fields" Text
971− :> QueryParam "alt" Text
969+ "adexchangebuyer" :>
970+ "v1.4" :>
971+ "deals" :>
972+ Capture "dealId" Int64 :>
973+ QueryParam "quotaUser" Text :>
974+ QueryParam "prettyPrint" Bool :>
975+ QueryParam "userIp" Text :>
976+ QueryParam "key" Text :>
977+ QueryParam "oauth_token" Text :>
978+ QueryParam "fields" Text :>
979+ QueryParam "alt" Text :> Get '[JSON] NegotiationDto
972980
973981type NegotiationroundsAPI = NegotiationroundsInsert
974982
975983-- | Adds the requested negotiationRound to the requested negotiation.
976984type NegotiationroundsInsert =
977− "adexchangebuyer" :> "v1.4" :> "negotiations" :>
978− Capture "negotiationId" Int64
979− :> "negotiationrounds"
980− :> QueryParam "quotaUser" Text
981− :> QueryParam "prettyPrint" Bool
982− :> QueryParam "userIp" Text
983− :> QueryParam "key" Text
984− :> QueryParam "oauth_token" Text
985− :> QueryParam "fields" Text
986− :> QueryParam "alt" Text
985+ "adexchangebuyer" :>
986+ "v1.4" :>
987+ "negotiations" :>
988+ Capture "negotiationId" Int64 :>
989+ "negotiationrounds" :>
990+ QueryParam "quotaUser" Text :>
991+ QueryParam "prettyPrint" Bool :>
992+ QueryParam "userIp" Text :>
993+ QueryParam "key" Text :>
994+ QueryParam "oauth_token" Text :>
995+ QueryParam "fields" Text :>
996+ QueryParam "alt" Text :>
997+ Post '[JSON] NegotiationRoundDto
987998
988999type AccountsAPI =
9891000 AccountsList :<|> AccountsPatch :<|> AccountsGet :<|>
@@ -991,50 +1002,58 @@ type AccountsAPI =
9911002
9921003-- | Retrieves the authenticated user\'s list of accounts.
9931004type AccountsList =
994− "adexchangebuyer" :> "v1.4" :> "accounts" :>
995− QueryParam "quotaUser" Text
996− :> QueryParam "prettyPrint" Bool
997− :> QueryParam "userIp" Text
998− :> QueryParam "key" Text
999− :> QueryParam "oauth_token" Text
1000− :> QueryParam "fields" Text
1001− :> QueryParam "alt" Text
1005+ "adexchangebuyer" :>
1006+ "v1.4" :>
1007+ "accounts" :>
1008+ QueryParam "quotaUser" Text :>
1009+ QueryParam "prettyPrint" Bool :>
1010+ QueryParam "userIp" Text :>
1011+ QueryParam "key" Text :>
1012+ QueryParam "oauth_token" Text :>
1013+ QueryParam "fields" Text :>
1014+ QueryParam "alt" Text :> Get '[JSON] AccountsList
10021015
10031016-- | Updates an existing account. This method supports patch semantics.
10041017type AccountsPatch =
1005− "adexchangebuyer" :> "v1.4" :> "accounts" :>
1006− Capture "id" Int32
1007− :> QueryParam "quotaUser" Text
1008− :> QueryParam "prettyPrint" Bool
1009− :> QueryParam "userIp" Text
1010− :> QueryParam "key" Text
1011− :> QueryParam "oauth_token" Text
1012− :> QueryParam "fields" Text
1013− :> QueryParam "alt" Text
1018+ "adexchangebuyer" :>
1019+ "v1.4" :>
1020+ "accounts" :>
1021+ Capture "id" Int32 :>
1022+ QueryParam "quotaUser" Text :>
1023+ QueryParam "prettyPrint" Bool :>
1024+ QueryParam "userIp" Text :>
1025+ QueryParam "key" Text :>
1026+ QueryParam "oauth_token" Text :>
1027+ QueryParam "fields" Text :>
1028+ QueryParam "alt" Text :> Patch '[JSON] Account
10141029
10151030-- | Gets one account by ID.
10161031type AccountsGet =
1017− "adexchangebuyer" :> "v1.4" :> "accounts" :>
1018− Capture "id" Int32
1019− :> QueryParam "quotaUser" Text
1020− :> QueryParam "prettyPrint" Bool
1021− :> QueryParam "userIp" Text
1022− :> QueryParam "key" Text
1023− :> QueryParam "oauth_token" Text
1024− :> QueryParam "fields" Text
1025− :> QueryParam "alt" Text
1032+ "adexchangebuyer" :>
1033+ "v1.4" :>
1034+ "accounts" :>
1035+ Capture "id" Int32 :>
1036+ QueryParam "quotaUser" Text :>
1037+ QueryParam "prettyPrint" Bool :>
1038+ QueryParam "userIp" Text :>
1039+ QueryParam "key" Text :>
1040+ QueryParam "oauth_token" Text :>
1041+ QueryParam "fields" Text :>
1042+ QueryParam "alt" Text :> Get '[JSON] Account
10261043
10271044-- | Updates an existing account.
10281045type AccountsUpdate =
1029− "adexchangebuyer" :> "v1.4" :> "accounts" :>
1030− Capture "id" Int32
1031− :> QueryParam "quotaUser" Text
1032− :> QueryParam "prettyPrint" Bool
1033− :> QueryParam "userIp" Text
1034− :> QueryParam "key" Text
1035− :> QueryParam "oauth_token" Text
1036− :> QueryParam "fields" Text
1037− :> QueryParam "alt" Text
1046+ "adexchangebuyer" :>
1047+ "v1.4" :>
1048+ "accounts" :>
1049+ Capture "id" Int32 :>
1050+ QueryParam "quotaUser" Text :>
1051+ QueryParam "prettyPrint" Bool :>
1052+ QueryParam "userIp" Text :>
1053+ QueryParam "key" Text :>
1054+ QueryParam "oauth_token" Text :>
1055+ QueryParam "fields" Text :>
1056+ QueryParam "alt" Text :> Put '[JSON] Account
10381057
10391058type BudgetAPI =
10401059 BudgetPatch :<|> BudgetGet :<|> BudgetUpdate
@@ -1043,136 +1062,157 @@ type BudgetAPI =
10431062-- accountId and billingId, with the budget amount in the request. This
10441063-- method supports patch semantics.
10451064type BudgetPatch =
1046− "adexchangebuyer" :> "v1.4" :> "billinginfo" :>
1047− Capture "accountId" Int64
1048− :> Capture "billingId" Int64
1049− :> QueryParam "quotaUser" Text
1050− :> QueryParam "prettyPrint" Bool
1051− :> QueryParam "userIp" Text
1052− :> QueryParam "key" Text
1053− :> QueryParam "oauth_token" Text
1054− :> QueryParam "fields" Text
1055− :> QueryParam "alt" Text
1065+ "adexchangebuyer" :>
1066+ "v1.4" :>
1067+ "billinginfo" :>
1068+ Capture "accountId" Int64 :>
1069+ Capture "billingId" Int64 :>
1070+ QueryParam "quotaUser" Text :>
1071+ QueryParam "prettyPrint" Bool :>
1072+ QueryParam "userIp" Text :>
1073+ QueryParam "key" Text :>
1074+ QueryParam "oauth_token" Text :>
1075+ QueryParam "fields" Text :>
1076+ QueryParam "alt" Text :> Patch '[JSON] Budget
10561077
10571078-- | Returns the budget information for the adgroup specified by the
10581079-- accountId and billingId.
10591080type BudgetGet =
1060− "adexchangebuyer" :> "v1.4" :> "billinginfo" :>
1061− Capture "accountId" Int64
1062− :> Capture "billingId" Int64
1063− :> QueryParam "quotaUser" Text
1064− :> QueryParam "prettyPrint" Bool
1065− :> QueryParam "userIp" Text
1066− :> QueryParam "key" Text
1067− :> QueryParam "oauth_token" Text
1068− :> QueryParam "fields" Text
1069− :> QueryParam "alt" Text
1081+ "adexchangebuyer" :>
1082+ "v1.4" :>
1083+ "billinginfo" :>
1084+ Capture "accountId" Int64 :>
1085+ Capture "billingId" Int64 :>
1086+ QueryParam "quotaUser" Text :>
1087+ QueryParam "prettyPrint" Bool :>
1088+ QueryParam "userIp" Text :>
1089+ QueryParam "key" Text :>
1090+ QueryParam "oauth_token" Text :>
1091+ QueryParam "fields" Text :>
1092+ QueryParam "alt" Text :> Get '[JSON] Budget
10701093
10711094-- | Updates the budget amount for the budget of the adgroup specified by the
10721095-- accountId and billingId, with the budget amount in the request.
10731096type BudgetUpdate =
1074− "adexchangebuyer" :> "v1.4" :> "billinginfo" :>
1075− Capture "accountId" Int64
1076− :> Capture "billingId" Int64
1077− :> QueryParam "quotaUser" Text
1078− :> QueryParam "prettyPrint" Bool
1079− :> QueryParam "userIp" Text
1080− :> QueryParam "key" Text
1081− :> QueryParam "oauth_token" Text
1082− :> QueryParam "fields" Text
1083− :> QueryParam "alt" Text
1097+ "adexchangebuyer" :>
1098+ "v1.4" :>
1099+ "billinginfo" :>
1100+ Capture "accountId" Int64 :>
1101+ Capture "billingId" Int64 :>
1102+ QueryParam "quotaUser" Text :>
1103+ QueryParam "prettyPrint" Bool :>
1104+ QueryParam "userIp" Text :>
1105+ QueryParam "key" Text :>
1106+ QueryParam "oauth_token" Text :>
1107+ QueryParam "fields" Text :>
1108+ QueryParam "alt" Text :> Put '[JSON] Budget
10841109
10851110type CreativesAPI =
10861111 CreativesInsert :<|> CreativesList :<|> CreativesGet
10871112
10881113-- | Submit a new creative.
10891114type CreativesInsert =
1090− "adexchangebuyer" :> "v1.4" :> "creatives" :>
1091− QueryParam "quotaUser" Text
1092− :> QueryParam "prettyPrint" Bool
1093− :> QueryParam "userIp" Text
1094− :> QueryParam "key" Text
1095− :> QueryParam "oauth_token" Text
1096− :> QueryParam "fields" Text
1097− :> QueryParam "alt" Text
1115+ "adexchangebuyer" :>
1116+ "v1.4" :>
1117+ "creatives" :>
1118+ QueryParam "quotaUser" Text :>
1119+ QueryParam "prettyPrint" Bool :>
1120+ QueryParam "userIp" Text :>
1121+ QueryParam "key" Text :>
1122+ QueryParam "oauth_token" Text :>
1123+ QueryParam "fields" Text :>
1124+ QueryParam "alt" Text :> Post '[JSON] Creative
10981125
10991126-- | Retrieves a list of the authenticated user\'s active creatives. A
11001127-- creative will be available 30-40 minutes after submission.
11011128type CreativesList =
1102− "adexchangebuyer" :> "v1.4" :> "creatives" :>
1103− QueryParam "quotaUser" Text
1104− :> QueryParam "prettyPrint" Bool
1105− :> QueryParam "buyerCreativeId" Text
1106− :> QueryParam "userIp" Text
1107− :> QueryParam "openAuctionStatusFilter" Text
1108− :> QueryParam "accountId" Int32
1109− :> QueryParam "key" Text
1110− :> QueryParam "pageToken" Text
1111− :> QueryParam "dealsStatusFilter" Text
1112− :> QueryParam "oauth_token" Text
1113− :> QueryParam "maxResults" Natural
1114− :> QueryParam "fields" Text
1115− :> QueryParam "alt" Text
1129+ "adexchangebuyer" :>
1130+ "v1.4" :>
1131+ "creatives" :>
1132+ QueryParam "quotaUser" Text :>
1133+ QueryParam "prettyPrint" Bool :>
1134+ QueryParam "buyerCreativeId" Text :>
1135+ QueryParam "userIp" Text :>
1136+ QueryParam "openAuctionStatusFilter" Text :>
1137+ QueryParam "accountId" Int32 :>
1138+ QueryParam "key" Text :>
1139+ QueryParam "pageToken" Text :>
1140+ QueryParam "dealsStatusFilter" Text :>
1141+ QueryParam "oauth_token" Text :>
1142+ QueryParam "maxResults" Natural :>
1143+ QueryParam "fields" Text :>
1144+ QueryParam "alt" Text :>
1145+ Get '[JSON] CreativesList
11161146
11171147-- | Gets the status for a single creative. A creative will be available
11181148-- 30-40 minutes after submission.
11191149type CreativesGet =
1120− "adexchangebuyer" :> "v1.4" :> "creatives" :>
1121− Capture "accountId" Int32
1122− :> Capture "buyerCreativeId" Text
1123− :> QueryParam "quotaUser" Text
1124− :> QueryParam "prettyPrint" Bool
1125− :> QueryParam "userIp" Text
1126− :> QueryParam "key" Text
1127− :> QueryParam "oauth_token" Text
1128− :> QueryParam "fields" Text
1129− :> QueryParam "alt" Text
1150+ "adexchangebuyer" :>
1151+ "v1.4" :>
1152+ "creatives" :>
1153+ Capture "accountId" Int32 :>
1154+ Capture "buyerCreativeId" Text :>
1155+ QueryParam "quotaUser" Text :>
1156+ QueryParam "prettyPrint" Bool :>
1157+ QueryParam "userIp" Text :>
1158+ QueryParam "key" Text :>
1159+ QueryParam "oauth_token" Text :>
1160+ QueryParam "fields" Text :>
1161+ QueryParam "alt" Text :> Get '[JSON] Creative
11301162
11311163type PerformanceReportAPI = PerformanceReportList
11321164
11331165-- | Retrieves the authenticated user\'s list of performance metrics.
11341166type PerformanceReportList =
1135− "adexchangebuyer" :> "v1.4" :> "performancereport" :>
1136− QueryParam "quotaUser" Text
1137− :> QueryParam "prettyPrint" Bool
1138− :> QueryParam "userIp" Text
1139− :> QueryParam "accountId" Int64
1140− :> QueryParam "key" Text
1141− :> QueryParam "pageToken" Text
1142− :> QueryParam "oauth_token" Text
1143− :> QueryParam "endDateTime" Text
1144− :> QueryParam "maxResults" Natural
1145− :> QueryParam "startDateTime" Text
1146− :> QueryParam "fields" Text
1147− :> QueryParam "alt" Text
1167+ "adexchangebuyer" :>
1168+ "v1.4" :>
1169+ "performancereport" :>
1170+ QueryParam "quotaUser" Text :>
1171+ QueryParam "prettyPrint" Bool :>
1172+ QueryParam "userIp" Text :>
1173+ QueryParam "accountId" Int64 :>
1174+ QueryParam "key" Text :>
1175+ QueryParam "pageToken" Text :>
1176+ QueryParam "oauth_token" Text :>
1177+ QueryParam "endDateTime" Text :>
1178+ QueryParam "maxResults" Natural :>
1179+ QueryParam "startDateTime" Text :>
1180+ QueryParam "fields" Text :>
1181+ QueryParam "alt" Text :>
1182+ Get '[JSON] PerformanceReportList
11481183
11491184type MarketplaceoffersAPI =
11501185 MarketplaceoffersGet :<|> MarketplaceoffersSearch
11511186
11521187-- | Gets the requested negotiation.
11531188type MarketplaceoffersGet =
1154− "adexchangebuyer" :> "v1.4" :> "marketplaceOffers" :>
1155− Capture "offerId" Text
1156− :> QueryParam "quotaUser" Text
1157− :> QueryParam "prettyPrint" Bool
1158− :> QueryParam "userIp" Text
1159− :> QueryParam "key" Text
1160− :> QueryParam "oauth_token" Text
1161− :> QueryParam "fields" Text
1162− :> QueryParam "alt" Text
1189+ "adexchangebuyer" :>
1190+ "v1.4" :>
1191+ "marketplaceOffers" :>
1192+ Capture "offerId" Text :>
1193+ QueryParam "quotaUser" Text :>
1194+ QueryParam "prettyPrint" Bool :>
1195+ QueryParam "userIp" Text :>
1196+ QueryParam "key" Text :>
1197+ QueryParam "oauth_token" Text :>
1198+ QueryParam "fields" Text :>
1199+ QueryParam "alt" Text :> Get '[JSON] MarketplaceOffer
11631200
11641201-- | Gets the requested negotiation.
11651202type MarketplaceoffersSearch =
1166− "adexchangebuyer" :> "v1.4" :> "marketplaceOffers" :>
1167− "search"
1168− :> QueryParam "quotaUser" Text
1169− :> QueryParam "prettyPrint" Bool
1170− :> QueryParam "userIp" Text
1171− :> QueryParam "key" Text
1172− :> QueryParam "pqlQuery" Text
1173− :> QueryParam "oauth_token" Text
1174− :> QueryParam "fields" Text
1175− :> QueryParam "alt" Text
1203+ "adexchangebuyer" :>
1204+ "v1.4" :>
1205+ "marketplaceOffers" :>
1206+ "search" :>
1207+ QueryParam "quotaUser" Text :>
1208+ QueryParam "prettyPrint" Bool :>
1209+ QueryParam "userIp" Text :>
1210+ QueryParam "key" Text :>
1211+ QueryParam "pqlQuery" Text :>
1212+ QueryParam "oauth_token" Text :>
1213+ QueryParam "fields" Text :>
1214+ QueryParam "alt" Text :>
1215+ Get '[JSON] GetOffersResponse
11761216
11771217type PretargetingConfigAPI =
11781218 PretargetingConfigInsert :<|> PretargetingConfigList
@@ -1183,81 +1223,98 @@ type PretargetingConfigAPI =
11831223
11841224-- | Inserts a new pretargeting configuration.
11851225type PretargetingConfigInsert =
1186− "adexchangebuyer" :> "v1.4" :> "pretargetingconfigs"
1187− :> Capture "accountId" Int64
1188− :> QueryParam "quotaUser" Text
1189− :> QueryParam "prettyPrint" Bool
1190− :> QueryParam "userIp" Text
1191− :> QueryParam "key" Text
1192− :> QueryParam "oauth_token" Text
1193− :> QueryParam "fields" Text
1194− :> QueryParam "alt" Text
1226+ "adexchangebuyer" :>
1227+ "v1.4" :>
1228+ "pretargetingconfigs" :>
1229+ Capture "accountId" Int64 :>
1230+ QueryParam "quotaUser" Text :>
1231+ QueryParam "prettyPrint" Bool :>
1232+ QueryParam "userIp" Text :>
1233+ QueryParam "key" Text :>
1234+ QueryParam "oauth_token" Text :>
1235+ QueryParam "fields" Text :>
1236+ QueryParam "alt" Text :>
1237+ Post '[JSON] PretargetingConfig
11951238
11961239-- | Retrieves a list of the authenticated user\'s pretargeting
11971240-- configurations.
11981241type PretargetingConfigList =
1199− "adexchangebuyer" :> "v1.4" :> "pretargetingconfigs"
1200− :> Capture "accountId" Int64
1201− :> QueryParam "quotaUser" Text
1202− :> QueryParam "prettyPrint" Bool
1203− :> QueryParam "userIp" Text
1204− :> QueryParam "key" Text
1205− :> QueryParam "oauth_token" Text
1206− :> QueryParam "fields" Text
1207− :> QueryParam "alt" Text
1242+ "adexchangebuyer" :>
1243+ "v1.4" :>
1244+ "pretargetingconfigs" :>
1245+ Capture "accountId" Int64 :>
1246+ QueryParam "quotaUser" Text :>
1247+ QueryParam "prettyPrint" Bool :>
1248+ QueryParam "userIp" Text :>
1249+ QueryParam "key" Text :>
1250+ QueryParam "oauth_token" Text :>
1251+ QueryParam "fields" Text :>
1252+ QueryParam "alt" Text :>
1253+ Get '[JSON] PretargetingConfigList
12081254
12091255-- | Updates an existing pretargeting config. This method supports patch
12101256-- semantics.
12111257type PretargetingConfigPatch =
1212− "adexchangebuyer" :> "v1.4" :> "pretargetingconfigs"
1213− :> Capture "accountId" Int64
1214− :> Capture "configId" Int64
1215− :> QueryParam "quotaUser" Text
1216− :> QueryParam "prettyPrint" Bool
1217− :> QueryParam "userIp" Text
1218− :> QueryParam "key" Text
1219− :> QueryParam "oauth_token" Text
1220− :> QueryParam "fields" Text
1221− :> QueryParam "alt" Text
1258+ "adexchangebuyer" :>
1259+ "v1.4" :>
1260+ "pretargetingconfigs" :>
1261+ Capture "accountId" Int64 :>
1262+ Capture "configId" Int64 :>
1263+ QueryParam "quotaUser" Text :>
1264+ QueryParam "prettyPrint" Bool :>
1265+ QueryParam "userIp" Text :>
1266+ QueryParam "key" Text :>
1267+ QueryParam "oauth_token" Text :>
1268+ QueryParam "fields" Text :>
1269+ QueryParam "alt" Text :>
1270+ Patch '[JSON] PretargetingConfig
12221271
12231272-- | Gets a specific pretargeting configuration
12241273type PretargetingConfigGet =
1225− "adexchangebuyer" :> "v1.4" :> "pretargetingconfigs"
1226− :> Capture "accountId" Int64
1227− :> Capture "configId" Int64
1228− :> QueryParam "quotaUser" Text
1229− :> QueryParam "prettyPrint" Bool
1230− :> QueryParam "userIp" Text
1231− :> QueryParam "key" Text
1232− :> QueryParam "oauth_token" Text
1233− :> QueryParam "fields" Text
1234− :> QueryParam "alt" Text
1274+ "adexchangebuyer" :>
1275+ "v1.4" :>
1276+ "pretargetingconfigs" :>
1277+ Capture "accountId" Int64 :>
1278+ Capture "configId" Int64 :>
1279+ QueryParam "quotaUser" Text :>
1280+ QueryParam "prettyPrint" Bool :>
1281+ QueryParam "userIp" Text :>
1282+ QueryParam "key" Text :>
1283+ QueryParam "oauth_token" Text :>
1284+ QueryParam "fields" Text :>
1285+ QueryParam "alt" Text :>
1286+ Get '[JSON] PretargetingConfig
12351287
12361288-- | Deletes an existing pretargeting config.
12371289type PretargetingConfigDelete =
1238− "adexchangebuyer" :> "v1.4" :> "pretargetingconfigs"
1239− :> Capture "accountId" Int64
1240− :> Capture "configId" Int64
1241− :> QueryParam "quotaUser" Text
1242− :> QueryParam "prettyPrint" Bool
1243− :> QueryParam "userIp" Text
1244− :> QueryParam "key" Text
1245− :> QueryParam "oauth_token" Text
1246− :> QueryParam "fields" Text
1247− :> QueryParam "alt" Text
1290+ "adexchangebuyer" :>
1291+ "v1.4" :>
1292+ "pretargetingconfigs" :>
1293+ Capture "accountId" Int64 :>
1294+ Capture "configId" Int64 :>
1295+ QueryParam "quotaUser" Text :>
1296+ QueryParam "prettyPrint" Bool :>
1297+ QueryParam "userIp" Text :>
1298+ QueryParam "key" Text :>
1299+ QueryParam "oauth_token" Text :>
1300+ QueryParam "fields" Text :>
1301+ QueryParam "alt" Text :> Delete '[JSON] ()
12481302
12491303-- | Updates an existing pretargeting config.
12501304type PretargetingConfigUpdate =
1251− "adexchangebuyer" :> "v1.4" :> "pretargetingconfigs"
1252− :> Capture "accountId" Int64
1253− :> Capture "configId" Int64
1254− :> QueryParam "quotaUser" Text
1255− :> QueryParam "prettyPrint" Bool
1256− :> QueryParam "userIp" Text
1257− :> QueryParam "key" Text
1258− :> QueryParam "oauth_token" Text
1259− :> QueryParam "fields" Text
1260− :> QueryParam "alt" Text
1305+ "adexchangebuyer" :>
1306+ "v1.4" :>
1307+ "pretargetingconfigs" :>
1308+ Capture "accountId" Int64 :>
1309+ Capture "configId" Int64 :>
1310+ QueryParam "quotaUser" Text :>
1311+ QueryParam "prettyPrint" Bool :>
1312+ QueryParam "userIp" Text :>
1313+ QueryParam "key" Text :>
1314+ QueryParam "oauth_token" Text :>
1315+ QueryParam "fields" Text :>
1316+ QueryParam "alt" Text :>
1317+ Put '[JSON] PretargetingConfig
12611318
12621319type MarketplaceordersAPI =
12631320 MarketplaceordersInsert :<|> MarketplaceordersPatch
@@ -1267,68 +1324,82 @@ type MarketplaceordersAPI =
12671324
12681325-- | Create the given list of orders
12691326type MarketplaceordersInsert =
1270− "adexchangebuyer" :> "v1.4" :> "marketplaceOrders" :>
1271− "insert"
1272− :> QueryParam "quotaUser" Text
1273− :> QueryParam "prettyPrint" Bool
1274− :> QueryParam "userIp" Text
1275− :> QueryParam "key" Text
1276− :> QueryParam "oauth_token" Text
1277− :> QueryParam "fields" Text
1278− :> QueryParam "alt" Text
1327+ "adexchangebuyer" :>
1328+ "v1.4" :>
1329+ "marketplaceOrders" :>
1330+ "insert" :>
1331+ QueryParam "quotaUser" Text :>
1332+ QueryParam "prettyPrint" Bool :>
1333+ QueryParam "userIp" Text :>
1334+ QueryParam "key" Text :>
1335+ QueryParam "oauth_token" Text :>
1336+ QueryParam "fields" Text :>
1337+ QueryParam "alt" Text :>
1338+ Post '[JSON] CreateOrdersResponse
12791339
12801340-- | Update the given order. This method supports patch semantics.
12811341type MarketplaceordersPatch =
1282− "adexchangebuyer" :> "v1.4" :> "marketplaceOrders" :>
1283− Capture "orderId" Text
1284− :> Capture "revisionNumber" Int64
1285− :> Capture "updateAction" Text
1286− :> QueryParam "quotaUser" Text
1287− :> QueryParam "prettyPrint" Bool
1288− :> QueryParam "userIp" Text
1289− :> QueryParam "key" Text
1290− :> QueryParam "oauth_token" Text
1291− :> QueryParam "fields" Text
1292− :> QueryParam "alt" Text
1342+ "adexchangebuyer" :>
1343+ "v1.4" :>
1344+ "marketplaceOrders" :>
1345+ Capture "orderId" Text :>
1346+ Capture "revisionNumber" Int64 :>
1347+ Capture "updateAction" Text :>
1348+ QueryParam "quotaUser" Text :>
1349+ QueryParam "prettyPrint" Bool :>
1350+ QueryParam "userIp" Text :>
1351+ QueryParam "key" Text :>
1352+ QueryParam "oauth_token" Text :>
1353+ QueryParam "fields" Text :>
1354+ QueryParam "alt" Text :>
1355+ Patch '[JSON] MarketplaceOrder
12931356
12941357-- | Get an order given its id
12951358type MarketplaceordersGet =
1296− "adexchangebuyer" :> "v1.4" :> "marketplaceOrders" :>
1297− Capture "orderId" Text
1298− :> QueryParam "quotaUser" Text
1299− :> QueryParam "prettyPrint" Bool
1300− :> QueryParam "userIp" Text
1301− :> QueryParam "key" Text
1302− :> QueryParam "oauth_token" Text
1303− :> QueryParam "fields" Text
1304− :> QueryParam "alt" Text
1359+ "adexchangebuyer" :>
1360+ "v1.4" :>
1361+ "marketplaceOrders" :>
1362+ Capture "orderId" Text :>
1363+ QueryParam "quotaUser" Text :>
1364+ QueryParam "prettyPrint" Bool :>
1365+ QueryParam "userIp" Text :>
1366+ QueryParam "key" Text :>
1367+ QueryParam "oauth_token" Text :>
1368+ QueryParam "fields" Text :>
1369+ QueryParam "alt" Text :> Get '[JSON] MarketplaceOrder
13051370
13061371-- | Search for orders using pql query
13071372type MarketplaceordersSearch =
1308− "adexchangebuyer" :> "v1.4" :> "marketplaceOrders" :>
1309− "search"
1310− :> QueryParam "quotaUser" Text
1311− :> QueryParam "prettyPrint" Bool
1312− :> QueryParam "userIp" Text
1313− :> QueryParam "key" Text
1314− :> QueryParam "pqlQuery" Text
1315− :> QueryParam "oauth_token" Text
1316− :> QueryParam "fields" Text
1317− :> QueryParam "alt" Text
1373+ "adexchangebuyer" :>
1374+ "v1.4" :>
1375+ "marketplaceOrders" :>
1376+ "search" :>
1377+ QueryParam "quotaUser" Text :>
1378+ QueryParam "prettyPrint" Bool :>
1379+ QueryParam "userIp" Text :>
1380+ QueryParam "key" Text :>
1381+ QueryParam "pqlQuery" Text :>
1382+ QueryParam "oauth_token" Text :>
1383+ QueryParam "fields" Text :>
1384+ QueryParam "alt" Text :>
1385+ Get '[JSON] GetOrdersResponse
13181386
13191387-- | Update the given order
13201388type MarketplaceordersUpdate =
1321− "adexchangebuyer" :> "v1.4" :> "marketplaceOrders" :>
1322− Capture "orderId" Text
1323− :> Capture "revisionNumber" Int64
1324− :> Capture "updateAction" Text
1325− :> QueryParam "quotaUser" Text
1326− :> QueryParam "prettyPrint" Bool
1327− :> QueryParam "userIp" Text
1328− :> QueryParam "key" Text
1329− :> QueryParam "oauth_token" Text
1330− :> QueryParam "fields" Text
1331− :> QueryParam "alt" Text
1389+ "adexchangebuyer" :>
1390+ "v1.4" :>
1391+ "marketplaceOrders" :>
1392+ Capture "orderId" Text :>
1393+ Capture "revisionNumber" Int64 :>
1394+ Capture "updateAction" Text :>
1395+ QueryParam "quotaUser" Text :>
1396+ QueryParam "prettyPrint" Bool :>
1397+ QueryParam "userIp" Text :>
1398+ QueryParam "key" Text :>
1399+ QueryParam "oauth_token" Text :>
1400+ QueryParam "fields" Text :>
1401+ QueryParam "alt" Text :>
1402+ Put '[JSON] MarketplaceOrder
13321403
13331404type ClientaccessAPI =
13341405 ClientaccessInsert :<|> ClientaccessList :<|>
@@ -1338,74 +1409,91 @@ type ClientaccessAPI =
13381409 :<|> ClientaccessUpdate
13391410
13401411type ClientaccessInsert =
1341− "adexchangebuyer" :> "v1.4" :> "clientAccess" :>
1342− QueryParam "quotaUser" Text
1343− :> QueryParam "prettyPrint" Bool
1344− :> QueryParam "userIp" Text
1345− :> QueryParam "sponsorAccountId" Int32
1346− :> QueryParam "key" Text
1347− :> QueryParam "clientAccountId" Int64
1348− :> QueryParam "oauth_token" Text
1349− :> QueryParam "fields" Text
1350− :> QueryParam "alt" Text
1412+ "adexchangebuyer" :>
1413+ "v1.4" :>
1414+ "clientAccess" :>
1415+ QueryParam "quotaUser" Text :>
1416+ QueryParam "prettyPrint" Bool :>
1417+ QueryParam "userIp" Text :>
1418+ QueryParam "sponsorAccountId" Int32 :>
1419+ QueryParam "key" Text :>
1420+ QueryParam "clientAccountId" Int64 :>
1421+ QueryParam "oauth_token" Text :>
1422+ QueryParam "fields" Text :>
1423+ QueryParam "alt" Text :>
1424+ Post '[JSON] ClientAccessCapabilities
13511425
13521426type ClientaccessList =
1353− "adexchangebuyer" :> "v1.4" :> "clientAccess" :>
1354− QueryParam "quotaUser" Text
1355− :> QueryParam "prettyPrint" Bool
1356− :> QueryParam "userIp" Text
1357− :> QueryParam "key" Text
1358− :> QueryParam "oauth_token" Text
1359− :> QueryParam "fields" Text
1360− :> QueryParam "alt" Text
1427+ "adexchangebuyer" :>
1428+ "v1.4" :>
1429+ "clientAccess" :>
1430+ QueryParam "quotaUser" Text :>
1431+ QueryParam "prettyPrint" Bool :>
1432+ QueryParam "userIp" Text :>
1433+ QueryParam "key" Text :>
1434+ QueryParam "oauth_token" Text :>
1435+ QueryParam "fields" Text :>
1436+ QueryParam "alt" Text :>
1437+ Get '[JSON] ListClientAccessCapabilitiesResponse
13611438
13621439type ClientaccessPatch =
1363− "adexchangebuyer" :> "v1.4" :> "clientAccess" :>
1364− Capture "clientAccountId" Int64
1365− :> QueryParam "quotaUser" Text
1366− :> QueryParam "prettyPrint" Bool
1367− :> QueryParam "userIp" Text
1368− :> QueryParam "sponsorAccountId" Int32
1369− :> QueryParam "key" Text
1370− :> QueryParam "oauth_token" Text
1371− :> QueryParam "fields" Text
1372− :> QueryParam "alt" Text
1440+ "adexchangebuyer" :>
1441+ "v1.4" :>
1442+ "clientAccess" :>
1443+ Capture "clientAccountId" Int64 :>
1444+ QueryParam "quotaUser" Text :>
1445+ QueryParam "prettyPrint" Bool :>
1446+ QueryParam "userIp" Text :>
1447+ QueryParam "sponsorAccountId" Int32 :>
1448+ QueryParam "key" Text :>
1449+ QueryParam "oauth_token" Text :>
1450+ QueryParam "fields" Text :>
1451+ QueryParam "alt" Text :>
1452+ Patch '[JSON] ClientAccessCapabilities
13731453
13741454type ClientaccessGet =
1375− "adexchangebuyer" :> "v1.4" :> "clientAccess" :>
1376− Capture "clientAccountId" Int64
1377− :> QueryParam "quotaUser" Text
1378− :> QueryParam "prettyPrint" Bool
1379− :> QueryParam "userIp" Text
1380− :> QueryParam "sponsorAccountId" Int32
1381− :> QueryParam "key" Text
1382− :> QueryParam "oauth_token" Text
1383− :> QueryParam "fields" Text
1384− :> QueryParam "alt" Text
1455+ "adexchangebuyer" :>
1456+ "v1.4" :>
1457+ "clientAccess" :>
1458+ Capture "clientAccountId" Int64 :>
1459+ QueryParam "quotaUser" Text :>
1460+ QueryParam "prettyPrint" Bool :>
1461+ QueryParam "userIp" Text :>
1462+ QueryParam "sponsorAccountId" Int32 :>
1463+ QueryParam "key" Text :>
1464+ QueryParam "oauth_token" Text :>
1465+ QueryParam "fields" Text :>
1466+ QueryParam "alt" Text :>
1467+ Get '[JSON] ClientAccessCapabilities
13851468
13861469type ClientaccessDelete =
1387− "adexchangebuyer" :> "v1.4" :> "clientAccess" :>
1388− Capture "clientAccountId" Int64
1389− :> QueryParam "quotaUser" Text
1390− :> QueryParam "prettyPrint" Bool
1391− :> QueryParam "userIp" Text
1392− :> QueryParam "sponsorAccountId" Int32
1393− :> QueryParam "key" Text
1394− :> QueryParam "oauth_token" Text
1395− :> QueryParam "fields" Text
1396− :> QueryParam "alt" Text
1470+ "adexchangebuyer" :>
1471+ "v1.4" :>
1472+ "clientAccess" :>
1473+ Capture "clientAccountId" Int64 :>
1474+ QueryParam "quotaUser" Text :>
1475+ QueryParam "prettyPrint" Bool :>
1476+ QueryParam "userIp" Text :>
1477+ QueryParam "sponsorAccountId" Int32 :>
1478+ QueryParam "key" Text :>
1479+ QueryParam "oauth_token" Text :>
1480+ QueryParam "fields" Text :>
1481+ QueryParam "alt" Text :> Delete '[JSON] ()
13971482
13981483type ClientaccessUpdate =
1399− "adexchangebuyer" :> "v1.4" :> "clientAccess" :>
1400− Capture "clientAccountId" Int64
1401− :> QueryParam "quotaUser" Text
1402− :> QueryParam "prettyPrint" Bool
1403− :> QueryParam "userIp" Text
1404− :> QueryParam "sponsorAccountId" Int32
1405− :> QueryParam "key" Text
1406− :> QueryParam "oauth_token" Text
1407− :> QueryParam "fields" Text
1408− :> QueryParam "alt" Text
1484+ "adexchangebuyer" :>
1485+ "v1.4" :>
1486+ "clientAccess" :>
1487+ Capture "clientAccountId" Int64 :>
1488+ QueryParam "quotaUser" Text :>
1489+ QueryParam "prettyPrint" Bool :>
1490+ QueryParam "userIp" Text :>
1491+ QueryParam "sponsorAccountId" Int32 :>
1492+ QueryParam "key" Text :>
1493+ QueryParam "oauth_token" Text :>
1494+ QueryParam "fields" Text :>
1495+ QueryParam "alt" Text :>
1496+ Put '[JSON] ClientAccessCapabilities
14091497
14101498type BillingInfoAPI =
14111499 BillingInfoList :<|> BillingInfoGet
@@ -1413,26 +1501,30 @@ type BillingInfoAPI =
14131501-- | Retrieves a list of billing information for all accounts of the
14141502-- authenticated user.
14151503type BillingInfoList =
1416− "adexchangebuyer" :> "v1.4" :> "billinginfo" :>
1417− QueryParam "quotaUser" Text
1418− :> QueryParam "prettyPrint" Bool
1419− :> QueryParam "userIp" Text
1420− :> QueryParam "key" Text
1421− :> QueryParam "oauth_token" Text
1422− :> QueryParam "fields" Text
1423− :> QueryParam "alt" Text
1504+ "adexchangebuyer" :>
1505+ "v1.4" :>
1506+ "billinginfo" :>
1507+ QueryParam "quotaUser" Text :>
1508+ QueryParam "prettyPrint" Bool :>
1509+ QueryParam "userIp" Text :>
1510+ QueryParam "key" Text :>
1511+ QueryParam "oauth_token" Text :>
1512+ QueryParam "fields" Text :>
1513+ QueryParam "alt" Text :> Get '[JSON] BillingInfoList
14241514
14251515-- | Returns the billing information for one account specified by account ID.
14261516type BillingInfoGet =
1427− "adexchangebuyer" :> "v1.4" :> "billinginfo" :>
1428− Capture "accountId" Int32
1429− :> QueryParam "quotaUser" Text
1430− :> QueryParam "prettyPrint" Bool
1431− :> QueryParam "userIp" Text
1432− :> QueryParam "key" Text
1433− :> QueryParam "oauth_token" Text
1434− :> QueryParam "fields" Text
1435− :> QueryParam "alt" Text
1517+ "adexchangebuyer" :>
1518+ "v1.4" :>
1519+ "billinginfo" :>
1520+ Capture "accountId" Int32 :>
1521+ QueryParam "quotaUser" Text :>
1522+ QueryParam "prettyPrint" Bool :>
1523+ QueryParam "userIp" Text :>
1524+ QueryParam "key" Text :>
1525+ QueryParam "oauth_token" Text :>
1526+ QueryParam "fields" Text :>
1527+ QueryParam "alt" Text :> Get '[JSON] BillingInfo
14361528
14371529type MarketplacedealsAPI =
14381530 MarketplacedealsInsert :<|> MarketplacedealsList :<|>
@@ -1441,58 +1533,70 @@ type MarketplacedealsAPI =
14411533
14421534-- | Add new deals for the specified order
14431535type MarketplacedealsInsert =
1444− "adexchangebuyer" :> "v1.4" :> "marketplaceOrders" :>
1445− Capture "orderId" Text
1446− :> "deals"
1447− :> "insert"
1448− :> QueryParam "quotaUser" Text
1449− :> QueryParam "prettyPrint" Bool
1450− :> QueryParam "userIp" Text
1451− :> QueryParam "key" Text
1452− :> QueryParam "oauth_token" Text
1453− :> QueryParam "fields" Text
1454− :> QueryParam "alt" Text
1536+ "adexchangebuyer" :>
1537+ "v1.4" :>
1538+ "marketplaceOrders" :>
1539+ Capture "orderId" Text :>
1540+ "deals" :>
1541+ "insert" :>
1542+ QueryParam "quotaUser" Text :>
1543+ QueryParam "prettyPrint" Bool :>
1544+ QueryParam "userIp" Text :>
1545+ QueryParam "key" Text :>
1546+ QueryParam "oauth_token" Text :>
1547+ QueryParam "fields" Text :>
1548+ QueryParam "alt" Text :>
1549+ Post '[JSON] AddOrderDealsResponse
14551550
14561551-- | List all the deals for a given order
14571552type MarketplacedealsList =
1458− "adexchangebuyer" :> "v1.4" :> "marketplaceOrders" :>
1459− Capture "orderId" Text
1460− :> "deals"
1461− :> QueryParam "quotaUser" Text
1462− :> QueryParam "prettyPrint" Bool
1463− :> QueryParam "userIp" Text
1464− :> QueryParam "key" Text
1465− :> QueryParam "oauth_token" Text
1466− :> QueryParam "fields" Text
1467− :> QueryParam "alt" Text
1553+ "adexchangebuyer" :>
1554+ "v1.4" :>
1555+ "marketplaceOrders" :>
1556+ Capture "orderId" Text :>
1557+ "deals" :>
1558+ QueryParam "quotaUser" Text :>
1559+ QueryParam "prettyPrint" Bool :>
1560+ QueryParam "userIp" Text :>
1561+ QueryParam "key" Text :>
1562+ QueryParam "oauth_token" Text :>
1563+ QueryParam "fields" Text :>
1564+ QueryParam "alt" Text :>
1565+ Get '[JSON] GetOrderDealsResponse
14681566
14691567-- | Delete the specified deals from the order
14701568type MarketplacedealsDelete =
1471− "adexchangebuyer" :> "v1.4" :> "marketplaceOrders" :>
1472− Capture "orderId" Text
1473− :> "deals"
1474− :> "delete"
1475− :> QueryParam "quotaUser" Text
1476− :> QueryParam "prettyPrint" Bool
1477− :> QueryParam "userIp" Text
1478− :> QueryParam "key" Text
1479− :> QueryParam "oauth_token" Text
1480− :> QueryParam "fields" Text
1481− :> QueryParam "alt" Text
1569+ "adexchangebuyer" :>
1570+ "v1.4" :>
1571+ "marketplaceOrders" :>
1572+ Capture "orderId" Text :>
1573+ "deals" :>
1574+ "delete" :>
1575+ QueryParam "quotaUser" Text :>
1576+ QueryParam "prettyPrint" Bool :>
1577+ QueryParam "userIp" Text :>
1578+ QueryParam "key" Text :>
1579+ QueryParam "oauth_token" Text :>
1580+ QueryParam "fields" Text :>
1581+ QueryParam "alt" Text :>
1582+ Post '[JSON] DeleteOrderDealsResponse
14821583
14831584-- | Replaces all the deals in the order with the passed in deals
14841585type MarketplacedealsUpdate =
1485− "adexchangebuyer" :> "v1.4" :> "marketplaceOrders" :>
1486− Capture "orderId" Text
1487− :> "deals"
1488− :> "update"
1489− :> QueryParam "quotaUser" Text
1490− :> QueryParam "prettyPrint" Bool
1491− :> QueryParam "userIp" Text
1492− :> QueryParam "key" Text
1493− :> QueryParam "oauth_token" Text
1494− :> QueryParam "fields" Text
1495− :> QueryParam "alt" Text
1586+ "adexchangebuyer" :>
1587+ "v1.4" :>
1588+ "marketplaceOrders" :>
1589+ Capture "orderId" Text :>
1590+ "deals" :>
1591+ "update" :>
1592+ QueryParam "quotaUser" Text :>
1593+ QueryParam "prettyPrint" Bool :>
1594+ QueryParam "userIp" Text :>
1595+ QueryParam "key" Text :>
1596+ QueryParam "oauth_token" Text :>
1597+ QueryParam "fields" Text :>
1598+ QueryParam "alt" Text :>
1599+ Post '[JSON] EditAllOrderDealsResponse
14961600
14971601type NegotiationsAPI =
14981602 NegotiationsInsert :<|> NegotiationsList :<|>
@@ -1500,71 +1604,85 @@ type NegotiationsAPI =
15001604
15011605-- | Creates or updates the requested negotiation.
15021606type NegotiationsInsert =
1503− "adexchangebuyer" :> "v1.4" :> "negotiations" :>
1504− QueryParam "quotaUser" Text
1505− :> QueryParam "prettyPrint" Bool
1506− :> QueryParam "userIp" Text
1507− :> QueryParam "key" Text
1508− :> QueryParam "oauth_token" Text
1509− :> QueryParam "fields" Text
1510− :> QueryParam "alt" Text
1607+ "adexchangebuyer" :>
1608+ "v1.4" :>
1609+ "negotiations" :>
1610+ QueryParam "quotaUser" Text :>
1611+ QueryParam "prettyPrint" Bool :>
1612+ QueryParam "userIp" Text :>
1613+ QueryParam "key" Text :>
1614+ QueryParam "oauth_token" Text :>
1615+ QueryParam "fields" Text :>
1616+ QueryParam "alt" Text :> Post '[JSON] NegotiationDto
15111617
15121618-- | Lists all negotiations the authenticated user has access to.
15131619type NegotiationsList =
1514− "adexchangebuyer" :> "v1.4" :> "negotiations" :>
1515− QueryParam "quotaUser" Text
1516− :> QueryParam "prettyPrint" Bool
1517− :> QueryParam "userIp" Text
1518− :> QueryParam "key" Text
1519− :> QueryParam "oauth_token" Text
1520− :> QueryParam "fields" Text
1521− :> QueryParam "alt" Text
1620+ "adexchangebuyer" :>
1621+ "v1.4" :>
1622+ "negotiations" :>
1623+ QueryParam "quotaUser" Text :>
1624+ QueryParam "prettyPrint" Bool :>
1625+ QueryParam "userIp" Text :>
1626+ QueryParam "key" Text :>
1627+ QueryParam "oauth_token" Text :>
1628+ QueryParam "fields" Text :>
1629+ QueryParam "alt" Text :>
1630+ Get '[JSON] GetNegotiationsResponse
15221631
15231632-- | Gets the requested negotiation.
15241633type NegotiationsGet =
1525− "adexchangebuyer" :> "v1.4" :> "negotiations" :>
1526− Capture "negotiationId" Int64
1527− :> QueryParam "quotaUser" Text
1528− :> QueryParam "prettyPrint" Bool
1529− :> QueryParam "userIp" Text
1530− :> QueryParam "key" Text
1531− :> QueryParam "oauth_token" Text
1532− :> QueryParam "fields" Text
1533− :> QueryParam "alt" Text
1634+ "adexchangebuyer" :>
1635+ "v1.4" :>
1636+ "negotiations" :>
1637+ Capture "negotiationId" Int64 :>
1638+ QueryParam "quotaUser" Text :>
1639+ QueryParam "prettyPrint" Bool :>
1640+ QueryParam "userIp" Text :>
1641+ QueryParam "key" Text :>
1642+ QueryParam "oauth_token" Text :>
1643+ QueryParam "fields" Text :>
1644+ QueryParam "alt" Text :> Get '[JSON] NegotiationDto
15341645
15351646type OffersAPI =
15361647 OffersInsert :<|> OffersList :<|> OffersGet
15371648
15381649-- | Creates or updates the requested offer.
15391650type OffersInsert =
1540− "adexchangebuyer" :> "v1.4" :> "offers" :>
1541− QueryParam "quotaUser" Text
1542− :> QueryParam "prettyPrint" Bool
1543− :> QueryParam "userIp" Text
1544− :> QueryParam "key" Text
1545− :> QueryParam "oauth_token" Text
1546− :> QueryParam "fields" Text
1547− :> QueryParam "alt" Text
1651+ "adexchangebuyer" :>
1652+ "v1.4" :>
1653+ "offers" :>
1654+ QueryParam "quotaUser" Text :>
1655+ QueryParam "prettyPrint" Bool :>
1656+ QueryParam "userIp" Text :>
1657+ QueryParam "key" Text :>
1658+ QueryParam "oauth_token" Text :>
1659+ QueryParam "fields" Text :>
1660+ QueryParam "alt" Text :> Post '[JSON] OfferDto
15481661
15491662-- | Lists all offers the authenticated user has access to.
15501663type OffersList =
1551− "adexchangebuyer" :> "v1.4" :> "offers" :>
1552− QueryParam "quotaUser" Text
1553− :> QueryParam "prettyPrint" Bool
1554− :> QueryParam "userIp" Text
1555− :> QueryParam "key" Text
1556− :> QueryParam "oauth_token" Text
1557− :> QueryParam "fields" Text
1558− :> QueryParam "alt" Text
1664+ "adexchangebuyer" :>
1665+ "v1.4" :>
1666+ "offers" :>
1667+ QueryParam "quotaUser" Text :>
1668+ QueryParam "prettyPrint" Bool :>
1669+ QueryParam "userIp" Text :>
1670+ QueryParam "key" Text :>
1671+ QueryParam "oauth_token" Text :>
1672+ QueryParam "fields" Text :>
1673+ QueryParam "alt" Text :>
1674+ Get '[JSON] ListOffersResponse
15591675
15601676-- | Gets the requested offer.
15611677type OffersGet =
1562− "adexchangebuyer" :> "v1.4" :> "offers" :>
1563− Capture "offerId" Int64
1564− :> QueryParam "quotaUser" Text
1565− :> QueryParam "prettyPrint" Bool
1566− :> QueryParam "userIp" Text
1567− :> QueryParam "key" Text
1568− :> QueryParam "oauth_token" Text
1569− :> QueryParam "fields" Text
1570− :> QueryParam "alt" Text
1678+ "adexchangebuyer" :>
1679+ "v1.4" :>
1680+ "offers" :>
1681+ Capture "offerId" Int64 :>
1682+ QueryParam "quotaUser" Text :>
1683+ QueryParam "prettyPrint" Bool :>
1684+ QueryParam "userIp" Text :>
1685+ QueryParam "key" Text :>
1686+ QueryParam "oauth_token" Text :>
1687+ QueryParam "fields" Text :>
1688+ QueryParam "alt" Text :> Get '[JSON] OfferDto
gogol-adexchange-buyer/gen/Network/Google/AdExchange/Buyer/Types/Product.hs+1957
@@ -1,6 +1,7 @@
11{-# LANGUAGE DeriveDataTypeable #-}
22{-# LANGUAGE DeriveGeneric #-}
33{-# LANGUAGE OverloadedStrings #-}
4+{-# LANGUAGE RecordWildCards #-}
45
56{-# OPTIONS_GHC -fno-warn-unused-imports #-}
67
@@ -117,6 +118,35 @@ aBidderLocation
117118 . _Default
118119 . _Coerce
119120
121+instance FromJSON Account where
122+ parseJSON
123+ = withObject "Account"
124+ (\ o ->
125+ Account <$>
126+ (o .:? "maximumTotalQps") <*>
127+ (o .:? "kind" .!= "adexchangebuyer#account")
128+ <*> (o .:? "cookieMatchingUrl")
129+ <*> (o .:? "maximumActiveCreatives")
130+ <*> (o .:? "cookieMatchingNid")
131+ <*> (o .:? "numberActiveCreatives")
132+ <*> (o .:? "id")
133+ <*> (o .:? "bidderLocation" .!= mempty))
134+
135+instance ToJSON Account where
136+ toJSON Account{..}
137+ = object
138+ (catMaybes
139+ [("maximumTotalQps" .=) <$> _aMaximumTotalQps,
140+ Just ("kind" .= _aKind),
141+ ("cookieMatchingUrl" .=) <$> _aCookieMatchingUrl,
142+ ("maximumActiveCreatives" .=) <$>
143+ _aMaximumActiveCreatives,
144+ ("cookieMatchingNid" .=) <$> _aCookieMatchingNid,
145+ ("numberActiveCreatives" .=) <$>
146+ _aNumberActiveCreatives,
147+ ("id" .=) <$> _aId,
148+ ("bidderLocation" .=) <$> _aBidderLocation])
149+
120150--
121151-- /See:/ 'accountItemBidderLocation' smart constructor.
122152data AccountItemBidderLocation = AccountItemBidderLocation
@@ -160,6 +190,22 @@ aiblRegion :: Lens' AccountItemBidderLocation (Maybe Text)
160190aiblRegion
161191 = lens _aiblRegion (\ s a -> s{_aiblRegion = a})
162192
193+instance FromJSON AccountItemBidderLocation where
194+ parseJSON
195+ = withObject "AccountItemBidderLocation"
196+ (\ o ->
197+ AccountItemBidderLocation <$>
198+ (o .:? "url") <*> (o .:? "maximumQps") <*>
199+ (o .:? "region"))
200+
201+instance ToJSON AccountItemBidderLocation where
202+ toJSON AccountItemBidderLocation{..}
203+ = object
204+ (catMaybes
205+ [("url" .=) <$> _aiblUrl,
206+ ("maximumQps" .=) <$> _aiblMaximumQps,
207+ ("region" .=) <$> _aiblRegion])
208+
163209-- | An account feed lists Ad Exchange buyer accounts that the user has
164210-- access to. Each entry in the feed corresponds to a single buyer account.
165211--
@@ -194,6 +240,21 @@ alItems
194240 = lens _alItems (\ s a -> s{_alItems = a}) . _Default
195241 . _Coerce
196242
243+instance FromJSON AccountsList where
244+ parseJSON
245+ = withObject "AccountsList"
246+ (\ o ->
247+ AccountsList <$>
248+ (o .:? "kind" .!= "adexchangebuyer#accountsList") <*>
249+ (o .:? "items" .!= mempty))
250+
251+instance ToJSON AccountsList where
252+ toJSON AccountsList{..}
253+ = object
254+ (catMaybes
255+ [Just ("kind" .= _alKind),
256+ ("items" .=) <$> _alItems])
257+
197258--
198259-- /See:/ 'adSize' smart constructor.
199260data AdSize = AdSize
@@ -222,6 +283,19 @@ asHeight = lens _asHeight (\ s a -> s{_asHeight = a})
222283asWidth :: Lens' AdSize (Maybe Int32)
223284asWidth = lens _asWidth (\ s a -> s{_asWidth = a})
224285
286+instance FromJSON AdSize where
287+ parseJSON
288+ = withObject "AdSize"
289+ (\ o ->
290+ AdSize <$> (o .:? "height") <*> (o .:? "width"))
291+
292+instance ToJSON AdSize where
293+ toJSON AdSize{..}
294+ = object
295+ (catMaybes
296+ [("height" .=) <$> _asHeight,
297+ ("width" .=) <$> _asWidth])
298+
225299--
226300-- /See:/ 'adSlotDto' smart constructor.
227301data AdSlotDto = AdSlotDto
@@ -285,6 +359,28 @@ asdDescription
285359 = lens _asdDescription
286360 (\ s a -> s{_asdDescription = a})
287361
362+instance FromJSON AdSlotDto where
363+ parseJSON
364+ = withObject "AdSlotDto"
365+ (\ o ->
366+ AdSlotDto <$>
367+ (o .:? "webPropertyId") <*> (o .:? "size") <*>
368+ (o .:? "channelCode")
369+ <*> (o .:? "channelId")
370+ <*> (o .:? "name")
371+ <*> (o .:? "description"))
372+
373+instance ToJSON AdSlotDto where
374+ toJSON AdSlotDto{..}
375+ = object
376+ (catMaybes
377+ [("webPropertyId" .=) <$> _asdWebPropertyId,
378+ ("size" .=) <$> _asdSize,
379+ ("channelCode" .=) <$> _asdChannelCode,
380+ ("channelId" .=) <$> _asdChannelId,
381+ ("name" .=) <$> _asdName,
382+ ("description" .=) <$> _asdDescription])
383+
288384--
289385-- /See:/ 'addOrderDealsRequest' smart constructor.
290386data AddOrderDealsRequest = AddOrderDealsRequest
@@ -330,6 +426,23 @@ aodrOrderRevisionNumber
330426 = lens _aodrOrderRevisionNumber
331427 (\ s a -> s{_aodrOrderRevisionNumber = a})
332428
429+instance FromJSON AddOrderDealsRequest where
430+ parseJSON
431+ = withObject "AddOrderDealsRequest"
432+ (\ o ->
433+ AddOrderDealsRequest <$>
434+ (o .:? "updateAction") <*> (o .:? "deals" .!= mempty)
435+ <*> (o .:? "orderRevisionNumber"))
436+
437+instance ToJSON AddOrderDealsRequest where
438+ toJSON AddOrderDealsRequest{..}
439+ = object
440+ (catMaybes
441+ [("updateAction" .=) <$> _aodrUpdateAction,
442+ ("deals" .=) <$> _aodrDeals,
443+ ("orderRevisionNumber" .=) <$>
444+ _aodrOrderRevisionNumber])
445+
333446--
334447-- /See:/ 'addOrderDealsResponse' smart constructor.
335448data AddOrderDealsResponse = AddOrderDealsResponse
@@ -364,6 +477,22 @@ aOrderRevisionNumber
364477 = lens _aOrderRevisionNumber
365478 (\ s a -> s{_aOrderRevisionNumber = a})
366479
480+instance FromJSON AddOrderDealsResponse where
481+ parseJSON
482+ = withObject "AddOrderDealsResponse"
483+ (\ o ->
484+ AddOrderDealsResponse <$>
485+ (o .:? "deals" .!= mempty) <*>
486+ (o .:? "orderRevisionNumber"))
487+
488+instance ToJSON AddOrderDealsResponse where
489+ toJSON AddOrderDealsResponse{..}
490+ = object
491+ (catMaybes
492+ [("deals" .=) <$> _aDeals,
493+ ("orderRevisionNumber" .=) <$>
494+ _aOrderRevisionNumber])
495+
367496--
368497-- /See:/ 'addOrderNotesRequest' smart constructor.
369498newtype AddOrderNotesRequest = AddOrderNotesRequest
@@ -388,6 +517,16 @@ aNotes
388517 = lens _aNotes (\ s a -> s{_aNotes = a}) . _Default .
389518 _Coerce
390519
520+instance FromJSON AddOrderNotesRequest where
521+ parseJSON
522+ = withObject "AddOrderNotesRequest"
523+ (\ o ->
524+ AddOrderNotesRequest <$> (o .:? "notes" .!= mempty))
525+
526+instance ToJSON AddOrderNotesRequest where
527+ toJSON AddOrderNotesRequest{..}
528+ = object (catMaybes [("notes" .=) <$> _aNotes])
529+
391530--
392531-- /See:/ 'addOrderNotesResponse' smart constructor.
393532newtype AddOrderNotesResponse = AddOrderNotesResponse
@@ -412,6 +551,16 @@ aonrNotes
412551 _Default
413552 . _Coerce
414553
554+instance FromJSON AddOrderNotesResponse where
555+ parseJSON
556+ = withObject "AddOrderNotesResponse"
557+ (\ o ->
558+ AddOrderNotesResponse <$> (o .:? "notes" .!= mempty))
559+
560+instance ToJSON AddOrderNotesResponse where
561+ toJSON AddOrderNotesResponse{..}
562+ = object (catMaybes [("notes" .=) <$> _aonrNotes])
563+
415564--
416565-- /See:/ 'advertiserDto' smart constructor.
417566data AdvertiserDto = AdvertiserDto
@@ -457,6 +606,23 @@ adName = lens _adName (\ s a -> s{_adName = a})
457606adId :: Lens' AdvertiserDto (Maybe Int64)
458607adId = lens _adId (\ s a -> s{_adId = a})
459608
609+instance FromJSON AdvertiserDto where
610+ parseJSON
611+ = withObject "AdvertiserDto"
612+ (\ o ->
613+ AdvertiserDto <$>
614+ (o .:? "status") <*> (o .:? "brands" .!= mempty) <*>
615+ (o .:? "name")
616+ <*> (o .:? "id"))
617+
618+instance ToJSON AdvertiserDto where
619+ toJSON AdvertiserDto{..}
620+ = object
621+ (catMaybes
622+ [("status" .=) <$> _adStatus,
623+ ("brands" .=) <$> _adBrands, ("name" .=) <$> _adName,
624+ ("id" .=) <$> _adId])
625+
460626--
461627-- /See:/ 'audienceSegment' smart constructor.
462628data AudienceSegment = AudienceSegment
@@ -502,6 +668,23 @@ asDescription
502668 = lens _asDescription
503669 (\ s a -> s{_asDescription = a})
504670
671+instance FromJSON AudienceSegment where
672+ parseJSON
673+ = withObject "AudienceSegment"
674+ (\ o ->
675+ AudienceSegment <$>
676+ (o .:? "numCookies") <*> (o .:? "name") <*>
677+ (o .:? "id")
678+ <*> (o .:? "description"))
679+
680+instance ToJSON AudienceSegment where
681+ toJSON AudienceSegment{..}
682+ = object
683+ (catMaybes
684+ [("numCookies" .=) <$> _asNumCookies,
685+ ("name" .=) <$> _asName, ("id" .=) <$> _asId,
686+ ("description" .=) <$> _asDescription])
687+
505688-- | The configuration data for an Ad Exchange billing info.
506689--
507690-- /See:/ 'billingInfo' smart constructor.
@@ -557,6 +740,25 @@ biBillingId
557740 _Default
558741 . _Coerce
559742
743+instance FromJSON BillingInfo where
744+ parseJSON
745+ = withObject "BillingInfo"
746+ (\ o ->
747+ BillingInfo <$>
748+ (o .:? "kind" .!= "adexchangebuyer#billingInfo") <*>
749+ (o .:? "accountName")
750+ <*> (o .:? "accountId")
751+ <*> (o .:? "billingId" .!= mempty))
752+
753+instance ToJSON BillingInfo where
754+ toJSON BillingInfo{..}
755+ = object
756+ (catMaybes
757+ [Just ("kind" .= _biKind),
758+ ("accountName" .=) <$> _biAccountName,
759+ ("accountId" .=) <$> _biAccountId,
760+ ("billingId" .=) <$> _biBillingId])
761+
560762-- | A billing info feed lists Billing Info the Ad Exchange buyer account has
561763-- access to. Each entry in the feed corresponds to a single billing info.
562764--
@@ -592,6 +794,21 @@ bilItems
592794 _Default
593795 . _Coerce
594796
797+instance FromJSON BillingInfoList where
798+ parseJSON
799+ = withObject "BillingInfoList"
800+ (\ o ->
801+ BillingInfoList <$>
802+ (o .:? "kind" .!= "adexchangebuyer#billingInfoList")
803+ <*> (o .:? "items" .!= mempty))
804+
805+instance ToJSON BillingInfoList where
806+ toJSON BillingInfoList{..}
807+ = object
808+ (catMaybes
809+ [Just ("kind" .= _bilKind),
810+ ("items" .=) <$> _bilItems])
811+
595812--
596813-- /See:/ 'brandDto' smart constructor.
597814data BrandDto = BrandDto
@@ -629,6 +846,21 @@ bName = lens _bName (\ s a -> s{_bName = a})
629846bId :: Lens' BrandDto (Maybe Int64)
630847bId = lens _bId (\ s a -> s{_bId = a})
631848
849+instance FromJSON BrandDto where
850+ parseJSON
851+ = withObject "BrandDto"
852+ (\ o ->
853+ BrandDto <$>
854+ (o .:? "advertiserId") <*> (o .:? "name") <*>
855+ (o .:? "id"))
856+
857+instance ToJSON BrandDto where
858+ toJSON BrandDto{..}
859+ = object
860+ (catMaybes
861+ [("advertiserId" .=) <$> _bAdvertiserId,
862+ ("name" .=) <$> _bName, ("id" .=) <$> _bId])
863+
632864-- | The configuration data for Ad Exchange RTB - Budget API.
633865--
634866-- /See:/ 'budget' smart constructor.
@@ -700,6 +932,29 @@ budBillingId :: Lens' Budget (Maybe Int64)
700932budBillingId
701933 = lens _budBillingId (\ s a -> s{_budBillingId = a})
702934
935+instance FromJSON Budget where
936+ parseJSON
937+ = withObject "Budget"
938+ (\ o ->
939+ Budget <$>
940+ (o .:? "currencyCode") <*>
941+ (o .:? "kind" .!= "adexchangebuyer#budget")
942+ <*> (o .:? "budgetAmount")
943+ <*> (o .:? "accountId")
944+ <*> (o .:? "id")
945+ <*> (o .:? "billingId"))
946+
947+instance ToJSON Budget where
948+ toJSON Budget{..}
949+ = object
950+ (catMaybes
951+ [("currencyCode" .=) <$> _budCurrencyCode,
952+ Just ("kind" .= _budKind),
953+ ("budgetAmount" .=) <$> _budBudgetAmount,
954+ ("accountId" .=) <$> _budAccountId,
955+ ("id" .=) <$> _budId,
956+ ("billingId" .=) <$> _budBillingId])
957+
703958--
704959-- /See:/ 'buyer' smart constructor.
705960newtype Buyer = Buyer
@@ -723,6 +978,16 @@ bAccountId :: Lens' Buyer (Maybe Text)
723978bAccountId
724979 = lens _bAccountId (\ s a -> s{_bAccountId = a})
725980
981+instance FromJSON Buyer where
982+ parseJSON
983+ = withObject "Buyer"
984+ (\ o -> Buyer <$> (o .:? "accountId"))
985+
986+instance ToJSON Buyer where
987+ toJSON Buyer{..}
988+ = object
989+ (catMaybes [("accountId" .=) <$> _bAccountId])
990+
726991--
727992-- /See:/ 'buyerDto' smart constructor.
728993data BuyerDto = BuyerDto
@@ -796,6 +1061,33 @@ bdDisplayName
7961061bdId :: Lens' BuyerDto (Maybe Int32)
7971062bdId = lens _bdId (\ s a -> s{_bdId = a})
7981063
1064+instance FromJSON BuyerDto where
1065+ parseJSON
1066+ = withObject "BuyerDto"
1067+ (\ o ->
1068+ BuyerDto <$>
1069+ (o .:? "sponsorAccountId") <*>
1070+ (o .:? "enabledForInterestTargetingDeals")
1071+ <*> (o .:? "customerId")
1072+ <*> (o .:? "enabledForPreferredDeals")
1073+ <*> (o .:? "accountId")
1074+ <*> (o .:? "displayName")
1075+ <*> (o .:? "id"))
1076+
1077+instance ToJSON BuyerDto where
1078+ toJSON BuyerDto{..}
1079+ = object
1080+ (catMaybes
1081+ [("sponsorAccountId" .=) <$> _bdSponsorAccountId,
1082+ ("enabledForInterestTargetingDeals" .=) <$>
1083+ _bdEnabledForInterestTargetingDeals,
1084+ ("customerId" .=) <$> _bdCustomerId,
1085+ ("enabledForPreferredDeals" .=) <$>
1086+ _bdEnabledForPreferredDeals,
1087+ ("accountId" .=) <$> _bdAccountId,
1088+ ("displayName" .=) <$> _bdDisplayName,
1089+ ("id" .=) <$> _bdId])
1090+
7991091--
8001092-- /See:/ 'clientAccessCapabilities' smart constructor.
8011093data ClientAccessCapabilities = ClientAccessCapabilities
@@ -830,6 +1122,21 @@ cacCapabilities
8301122 . _Default
8311123 . _Coerce
8321124
1125+instance FromJSON ClientAccessCapabilities where
1126+ parseJSON
1127+ = withObject "ClientAccessCapabilities"
1128+ (\ o ->
1129+ ClientAccessCapabilities <$>
1130+ (o .:? "clientAccountId") <*>
1131+ (o .:? "capabilities" .!= mempty))
1132+
1133+instance ToJSON ClientAccessCapabilities where
1134+ toJSON ClientAccessCapabilities{..}
1135+ = object
1136+ (catMaybes
1137+ [("clientAccountId" .=) <$> _cacClientAccountId,
1138+ ("capabilities" .=) <$> _cacCapabilities])
1139+
8331140--
8341141-- /See:/ 'contactInformation' smart constructor.
8351142data ContactInformation = ContactInformation
@@ -860,6 +1167,19 @@ ciEmail = lens _ciEmail (\ s a -> s{_ciEmail = a})
8601167ciName :: Lens' ContactInformation (Maybe Text)
8611168ciName = lens _ciName (\ s a -> s{_ciName = a})
8621169
1170+instance FromJSON ContactInformation where
1171+ parseJSON
1172+ = withObject "ContactInformation"
1173+ (\ o ->
1174+ ContactInformation <$>
1175+ (o .:? "email") <*> (o .:? "name"))
1176+
1177+instance ToJSON ContactInformation where
1178+ toJSON ContactInformation{..}
1179+ = object
1180+ (catMaybes
1181+ [("email" .=) <$> _ciEmail, ("name" .=) <$> _ciName])
1182+
8631183--
8641184-- /See:/ 'createOrdersRequest' smart constructor.
8651185data CreateOrdersRequest = CreateOrdersRequest
@@ -893,6 +1213,21 @@ cOrders
8931213 = lens _cOrders (\ s a -> s{_cOrders = a}) . _Default
8941214 . _Coerce
8951215
1216+instance FromJSON CreateOrdersRequest where
1217+ parseJSON
1218+ = withObject "CreateOrdersRequest"
1219+ (\ o ->
1220+ CreateOrdersRequest <$>
1221+ (o .:? "webPropertyCode") <*>
1222+ (o .:? "orders" .!= mempty))
1223+
1224+instance ToJSON CreateOrdersRequest where
1225+ toJSON CreateOrdersRequest{..}
1226+ = object
1227+ (catMaybes
1228+ [("webPropertyCode" .=) <$> _cWebPropertyCode,
1229+ ("orders" .=) <$> _cOrders])
1230+
8961231--
8971232-- /See:/ 'createOrdersResponse' smart constructor.
8981233newtype CreateOrdersResponse = CreateOrdersResponse
@@ -918,6 +1253,16 @@ corOrders
9181253 _Default
9191254 . _Coerce
9201255
1256+instance FromJSON CreateOrdersResponse where
1257+ parseJSON
1258+ = withObject "CreateOrdersResponse"
1259+ (\ o ->
1260+ CreateOrdersResponse <$> (o .:? "orders" .!= mempty))
1261+
1262+instance ToJSON CreateOrdersResponse where
1263+ toJSON CreateOrdersResponse{..}
1264+ = object (catMaybes [("orders" .=) <$> _corOrders])
1265+
9211266-- | A creative and its classification data.
9221267--
9231268-- /See:/ 'creative' smart constructor.
@@ -1207,6 +1552,68 @@ cOpenAuctionStatus
12071552 = lens _cOpenAuctionStatus
12081553 (\ s a -> s{_cOpenAuctionStatus = a})
12091554
1555+instance FromJSON Creative where
1556+ parseJSON
1557+ = withObject "Creative"
1558+ (\ o ->
1559+ Creative <$>
1560+ (o .:? "attribute" .!= mempty) <*> (o .:? "nativeAd")
1561+ <*> (o .:? "height")
1562+ <*> (o .:? "buyerCreativeId")
1563+ <*> (o .:? "advertiserName")
1564+ <*> (o .:? "agencyId")
1565+ <*> (o .:? "corrections" .!= mempty)
1566+ <*> (o .:? "productCategories" .!= mempty)
1567+ <*> (o .:? "kind" .!= "adexchangebuyer#creative")
1568+ <*> (o .:? "HTMLSnippet")
1569+ <*> (o .:? "advertiserId" .!= mempty)
1570+ <*> (o .:? "restrictedCategories" .!= mempty)
1571+ <*> (o .:? "dealsStatus")
1572+ <*> (o .:? "width")
1573+ <*> (o .:? "clickThroughUrl" .!= mempty)
1574+ <*> (o .:? "vendorType" .!= mempty)
1575+ <*> (o .:? "accountId")
1576+ <*> (o .:? "impressionTrackingUrl" .!= mempty)
1577+ <*> (o .:? "filteringReasons")
1578+ <*> (o .:? "version")
1579+ <*> (o .:? "sensitiveCategories" .!= mempty)
1580+ <*> (o .:? "videoURL")
1581+ <*> (o .:? "api_upload_timestamp")
1582+ <*> (o .:? "servingRestrictions" .!= mempty)
1583+ <*> (o .:? "openAuctionStatus"))
1584+
1585+instance ToJSON Creative where
1586+ toJSON Creative{..}
1587+ = object
1588+ (catMaybes
1589+ [("attribute" .=) <$> _cAttribute,
1590+ ("nativeAd" .=) <$> _cNativeAd,
1591+ ("height" .=) <$> _cHeight,
1592+ ("buyerCreativeId" .=) <$> _cBuyerCreativeId,
1593+ ("advertiserName" .=) <$> _cAdvertiserName,
1594+ ("agencyId" .=) <$> _cAgencyId,
1595+ ("corrections" .=) <$> _cCorrections,
1596+ ("productCategories" .=) <$> _cProductCategories,
1597+ Just ("kind" .= _cKind),
1598+ ("HTMLSnippet" .=) <$> _cHTMLSnippet,
1599+ ("advertiserId" .=) <$> _cAdvertiserId,
1600+ ("restrictedCategories" .=) <$>
1601+ _cRestrictedCategories,
1602+ ("dealsStatus" .=) <$> _cDealsStatus,
1603+ ("width" .=) <$> _cWidth,
1604+ ("clickThroughUrl" .=) <$> _cClickThroughUrl,
1605+ ("vendorType" .=) <$> _cVendorType,
1606+ ("accountId" .=) <$> _cAccountId,
1607+ ("impressionTrackingUrl" .=) <$>
1608+ _cImpressionTrackingUrl,
1609+ ("filteringReasons" .=) <$> _cFilteringReasons,
1610+ ("version" .=) <$> _cVersion,
1611+ ("sensitiveCategories" .=) <$> _cSensitiveCategories,
1612+ ("videoURL" .=) <$> _cVideoURL,
1613+ ("api_upload_timestamp" .=) <$> _cApiUploadTimestamp,
1614+ ("servingRestrictions" .=) <$> _cServingRestrictions,
1615+ ("openAuctionStatus" .=) <$> _cOpenAuctionStatus])
1616+
12101617-- | The app icon, for app download ads.
12111618--
12121619-- /See:/ 'creativeAppIconNativeAd' smart constructor.
@@ -1245,6 +1652,22 @@ cainaWidth :: Lens' CreativeAppIconNativeAd (Maybe Int32)
12451652cainaWidth
12461653 = lens _cainaWidth (\ s a -> s{_cainaWidth = a})
12471654
1655+instance FromJSON CreativeAppIconNativeAd where
1656+ parseJSON
1657+ = withObject "CreativeAppIconNativeAd"
1658+ (\ o ->
1659+ CreativeAppIconNativeAd <$>
1660+ (o .:? "height") <*> (o .:? "url") <*>
1661+ (o .:? "width"))
1662+
1663+instance ToJSON CreativeAppIconNativeAd where
1664+ toJSON CreativeAppIconNativeAd{..}
1665+ = object
1666+ (catMaybes
1667+ [("height" .=) <$> _cainaHeight,
1668+ ("url" .=) <$> _cainaUrl,
1669+ ("width" .=) <$> _cainaWidth])
1670+
12481671-- | The filtering reasons for the creative. Read-only. This field should not
12491672-- be set in requests.
12501673--
@@ -1281,6 +1704,20 @@ cfrReasons
12811704cfrDate :: Lens' CreativeFilteringReasons (Maybe Text)
12821705cfrDate = lens _cfrDate (\ s a -> s{_cfrDate = a})
12831706
1707+instance FromJSON CreativeFilteringReasons where
1708+ parseJSON
1709+ = withObject "CreativeFilteringReasons"
1710+ (\ o ->
1711+ CreativeFilteringReasons <$>
1712+ (o .:? "reasons" .!= mempty) <*> (o .:? "date"))
1713+
1714+instance ToJSON CreativeFilteringReasons where
1715+ toJSON CreativeFilteringReasons{..}
1716+ = object
1717+ (catMaybes
1718+ [("reasons" .=) <$> _cfrReasons,
1719+ ("date" .=) <$> _cfrDate])
1720+
12841721-- | A large image.
12851722--
12861723-- /See:/ 'creativeImageNativeAd' smart constructor.
@@ -1319,6 +1756,22 @@ cinaWidth :: Lens' CreativeImageNativeAd (Maybe Int32)
13191756cinaWidth
13201757 = lens _cinaWidth (\ s a -> s{_cinaWidth = a})
13211758
1759+instance FromJSON CreativeImageNativeAd where
1760+ parseJSON
1761+ = withObject "CreativeImageNativeAd"
1762+ (\ o ->
1763+ CreativeImageNativeAd <$>
1764+ (o .:? "height") <*> (o .:? "url") <*>
1765+ (o .:? "width"))
1766+
1767+instance ToJSON CreativeImageNativeAd where
1768+ toJSON CreativeImageNativeAd{..}
1769+ = object
1770+ (catMaybes
1771+ [("height" .=) <$> _cinaHeight,
1772+ ("url" .=) <$> _cinaUrl,
1773+ ("width" .=) <$> _cinaWidth])
1774+
13221775--
13231776-- /See:/ 'creativeItemContextsItemServingRestrictions' smart constructor.
13241777data CreativeItemContextsItemServingRestrictions = CreativeItemContextsItemServingRestrictions
@@ -1382,6 +1835,29 @@ cicisrGeoCriteriaId
13821835 . _Default
13831836 . _Coerce
13841837
1838+instance FromJSON
1839+ CreativeItemContextsItemServingRestrictions where
1840+ parseJSON
1841+ = withObject
1842+ "CreativeItemContextsItemServingRestrictions"
1843+ (\ o ->
1844+ CreativeItemContextsItemServingRestrictions <$>
1845+ (o .:? "platform" .!= mempty) <*>
1846+ (o .:? "contextType")
1847+ <*> (o .:? "auctionType" .!= mempty)
1848+ <*> (o .:? "geoCriteriaId" .!= mempty))
1849+
1850+instance ToJSON
1851+ CreativeItemContextsItemServingRestrictions where
1852+ toJSON
1853+ CreativeItemContextsItemServingRestrictions{..}
1854+ = object
1855+ (catMaybes
1856+ [("platform" .=) <$> _cicisrPlatform,
1857+ ("contextType" .=) <$> _cicisrContextType,
1858+ ("auctionType" .=) <$> _cicisrAuctionType,
1859+ ("geoCriteriaId" .=) <$> _cicisrGeoCriteriaId])
1860+
13851861--
13861862-- /See:/ 'creativeItemCorrections' smart constructor.
13871863data CreativeItemCorrections = CreativeItemCorrections
@@ -1416,6 +1892,20 @@ cicDetails
14161892 _Default
14171893 . _Coerce
14181894
1895+instance FromJSON CreativeItemCorrections where
1896+ parseJSON
1897+ = withObject "CreativeItemCorrections"
1898+ (\ o ->
1899+ CreativeItemCorrections <$>
1900+ (o .:? "reason") <*> (o .:? "details" .!= mempty))
1901+
1902+instance ToJSON CreativeItemCorrections where
1903+ toJSON CreativeItemCorrections{..}
1904+ = object
1905+ (catMaybes
1906+ [("reason" .=) <$> _cicReason,
1907+ ("details" .=) <$> _cicDetails])
1908+
14191909--
14201910-- /See:/ 'creativeItemDisapprovalReasonsItemServingRestrictions' smart constructor.
14211911data CreativeItemDisapprovalReasonsItemServingRestrictions = CreativeItemDisapprovalReasonsItemServingRestrictions
@@ -1452,6 +1942,27 @@ cidrisrDetails
14521942 . _Default
14531943 . _Coerce
14541944
1945+instance FromJSON
1946+ CreativeItemDisapprovalReasonsItemServingRestrictions
1947+ where
1948+ parseJSON
1949+ = withObject
1950+ "CreativeItemDisapprovalReasonsItemServingRestrictions"
1951+ (\ o ->
1952+ CreativeItemDisapprovalReasonsItemServingRestrictions
1953+ <$>
1954+ (o .:? "reason") <*> (o .:? "details" .!= mempty))
1955+
1956+instance ToJSON
1957+ CreativeItemDisapprovalReasonsItemServingRestrictions
1958+ where
1959+ toJSON
1960+ CreativeItemDisapprovalReasonsItemServingRestrictions{..}
1961+ = object
1962+ (catMaybes
1963+ [("reason" .=) <$> _cidrisrReason,
1964+ ("details" .=) <$> _cidrisrDetails])
1965+
14551966--
14561967-- /See:/ 'creativeItemReasonsFilteringReasons' smart constructor.
14571968data CreativeItemReasonsFilteringReasons = CreativeItemReasonsFilteringReasons
@@ -1488,6 +1999,23 @@ cirfrFilteringCount
14881999 = lens _cirfrFilteringCount
14892000 (\ s a -> s{_cirfrFilteringCount = a})
14902001
2002+instance FromJSON CreativeItemReasonsFilteringReasons
2003+ where
2004+ parseJSON
2005+ = withObject "CreativeItemReasonsFilteringReasons"
2006+ (\ o ->
2007+ CreativeItemReasonsFilteringReasons <$>
2008+ (o .:? "filteringStatus") <*>
2009+ (o .:? "filteringCount"))
2010+
2011+instance ToJSON CreativeItemReasonsFilteringReasons
2012+ where
2013+ toJSON CreativeItemReasonsFilteringReasons{..}
2014+ = object
2015+ (catMaybes
2016+ [("filteringStatus" .=) <$> _cirfrFilteringStatus,
2017+ ("filteringCount" .=) <$> _cirfrFilteringCount])
2018+
14912019--
14922020-- /See:/ 'creativeItemServingRestrictions' smart constructor.
14932021data CreativeItemServingRestrictions = CreativeItemServingRestrictions
@@ -1539,6 +2067,24 @@ cisrDisapprovalReasons
15392067 . _Default
15402068 . _Coerce
15412069
2070+instance FromJSON CreativeItemServingRestrictions
2071+ where
2072+ parseJSON
2073+ = withObject "CreativeItemServingRestrictions"
2074+ (\ o ->
2075+ CreativeItemServingRestrictions <$>
2076+ (o .:? "contexts" .!= mempty) <*> (o .:? "reason")
2077+ <*> (o .:? "disapprovalReasons" .!= mempty))
2078+
2079+instance ToJSON CreativeItemServingRestrictions where
2080+ toJSON CreativeItemServingRestrictions{..}
2081+ = object
2082+ (catMaybes
2083+ [("contexts" .=) <$> _cisrContexts,
2084+ ("reason" .=) <$> _cisrReason,
2085+ ("disapprovalReasons" .=) <$>
2086+ _cisrDisapprovalReasons])
2087+
15422088-- | A smaller image, for the advertiser logo.
15432089--
15442090-- /See:/ 'creativeLogoNativeAd' smart constructor.
@@ -1577,6 +2123,22 @@ clnaWidth :: Lens' CreativeLogoNativeAd (Maybe Int32)
15772123clnaWidth
15782124 = lens _clnaWidth (\ s a -> s{_clnaWidth = a})
15792125
2126+instance FromJSON CreativeLogoNativeAd where
2127+ parseJSON
2128+ = withObject "CreativeLogoNativeAd"
2129+ (\ o ->
2130+ CreativeLogoNativeAd <$>
2131+ (o .:? "height") <*> (o .:? "url") <*>
2132+ (o .:? "width"))
2133+
2134+instance ToJSON CreativeLogoNativeAd where
2135+ toJSON CreativeLogoNativeAd{..}
2136+ = object
2137+ (catMaybes
2138+ [("height" .=) <$> _clnaHeight,
2139+ ("url" .=) <$> _clnaUrl,
2140+ ("width" .=) <$> _clnaWidth])
2141+
15802142-- | If nativeAd is set, HTMLSnippet and videoURL should not be set.
15812143--
15822144-- /See:/ 'creativeNativeAd' smart constructor.
@@ -1701,6 +2263,41 @@ cnaStarRating
17012263cnaLogo :: Lens' CreativeNativeAd (Maybe CreativeLogoNativeAd)
17022264cnaLogo = lens _cnaLogo (\ s a -> s{_cnaLogo = a})
17032265
2266+instance FromJSON CreativeNativeAd where
2267+ parseJSON
2268+ = withObject "CreativeNativeAd"
2269+ (\ o ->
2270+ CreativeNativeAd <$>
2271+ (o .:? "image") <*> (o .:? "appIcon") <*>
2272+ (o .:? "clickTrackingUrl")
2273+ <*> (o .:? "body")
2274+ <*> (o .:? "headline")
2275+ <*> (o .:? "impressionTrackingUrl" .!= mempty)
2276+ <*> (o .:? "callToAction")
2277+ <*> (o .:? "store")
2278+ <*> (o .:? "price")
2279+ <*> (o .:? "advertiser")
2280+ <*> (o .:? "starRating")
2281+ <*> (o .:? "logo"))
2282+
2283+instance ToJSON CreativeNativeAd where
2284+ toJSON CreativeNativeAd{..}
2285+ = object
2286+ (catMaybes
2287+ [("image" .=) <$> _cnaImage,
2288+ ("appIcon" .=) <$> _cnaAppIcon,
2289+ ("clickTrackingUrl" .=) <$> _cnaClickTrackingUrl,
2290+ ("body" .=) <$> _cnaBody,
2291+ ("headline" .=) <$> _cnaHeadline,
2292+ ("impressionTrackingUrl" .=) <$>
2293+ _cnaImpressionTrackingUrl,
2294+ ("callToAction" .=) <$> _cnaCallToAction,
2295+ ("store" .=) <$> _cnaStore,
2296+ ("price" .=) <$> _cnaPrice,
2297+ ("advertiser" .=) <$> _cnaAdvertiser,
2298+ ("starRating" .=) <$> _cnaStarRating,
2299+ ("logo" .=) <$> _cnaLogo])
2300+
17042301-- | The creatives feed lists the active creatives for the Ad Exchange buyer
17052302-- accounts that the user has access to. Each entry in the feed corresponds
17062303-- to a single creative.
@@ -1747,6 +2344,22 @@ clItems
17472344 = lens _clItems (\ s a -> s{_clItems = a}) . _Default
17482345 . _Coerce
17492346
2347+instance FromJSON CreativesList where
2348+ parseJSON
2349+ = withObject "CreativesList"
2350+ (\ o ->
2351+ CreativesList <$>
2352+ (o .:? "nextPageToken") <*>
2353+ (o .:? "kind" .!= "adexchangebuyer#creativesList")
2354+ <*> (o .:? "items" .!= mempty))
2355+
2356+instance ToJSON CreativesList where
2357+ toJSON CreativesList{..}
2358+ = object
2359+ (catMaybes
2360+ [("nextPageToken" .=) <$> _clNextPageToken,
2361+ Just ("kind" .= _clKind), ("items" .=) <$> _clItems])
2362+
17502363--
17512364-- /See:/ 'dateTime' smart constructor.
17522365data DateTime = DateTime
@@ -1811,6 +2424,27 @@ dtTimeZoneId :: Lens' DateTime (Maybe Text)
18112424dtTimeZoneId
18122425 = lens _dtTimeZoneId (\ s a -> s{_dtTimeZoneId = a})
18132426
2427+instance FromJSON DateTime where
2428+ parseJSON
2429+ = withObject "DateTime"
2430+ (\ o ->
2431+ DateTime <$>
2432+ (o .:? "second") <*> (o .:? "day") <*> (o .:? "year")
2433+ <*> (o .:? "hour")
2434+ <*> (o .:? "month")
2435+ <*> (o .:? "minute")
2436+ <*> (o .:? "timeZoneId"))
2437+
2438+instance ToJSON DateTime where
2439+ toJSON DateTime{..}
2440+ = object
2441+ (catMaybes
2442+ [("second" .=) <$> _dtSecond, ("day" .=) <$> _dtDay,
2443+ ("year" .=) <$> _dtYear, ("hour" .=) <$> _dtHour,
2444+ ("month" .=) <$> _dtMonth,
2445+ ("minute" .=) <$> _dtMinute,
2446+ ("timeZoneId" .=) <$> _dtTimeZoneId])
2447+
18142448--
18152449-- /See:/ 'dealPartyDto' smart constructor.
18162450data DealPartyDto = DealPartyDto
@@ -1866,6 +2500,26 @@ dpdWebProperty
18662500dpdBuyer :: Lens' DealPartyDto (Maybe (Maybe BuyerDto))
18672501dpdBuyer = lens _dpdBuyer (\ s a -> s{_dpdBuyer = a})
18682502
2503+instance FromJSON DealPartyDto where
2504+ parseJSON
2505+ = withObject "DealPartyDto"
2506+ (\ o ->
2507+ DealPartyDto <$>
2508+ (o .:? "buyerSellerRole") <*> (o .:? "customerId")
2509+ <*> (o .:? "name")
2510+ <*> (o .:? "webProperty")
2511+ <*> (o .:? "buyer"))
2512+
2513+instance ToJSON DealPartyDto where
2514+ toJSON DealPartyDto{..}
2515+ = object
2516+ (catMaybes
2517+ [("buyerSellerRole" .=) <$> _dpdBuyerSellerRole,
2518+ ("customerId" .=) <$> _dpdCustomerId,
2519+ ("name" .=) <$> _dpdName,
2520+ ("webProperty" .=) <$> _dpdWebProperty,
2521+ ("buyer" .=) <$> _dpdBuyer])
2522+
18692523--
18702524-- /See:/ 'dealTerms' smart constructor.
18712525data DealTerms = DealTerms
@@ -1920,6 +2574,28 @@ dtDescription
19202574 = lens _dtDescription
19212575 (\ s a -> s{_dtDescription = a})
19222576
2577+instance FromJSON DealTerms where
2578+ parseJSON
2579+ = withObject "DealTerms"
2580+ (\ o ->
2581+ DealTerms <$>
2582+ (o .:? "nonGuaranteedFixedPriceTerms") <*>
2583+ (o .:? "nonGuaranteedAuctionTerms")
2584+ <*> (o .:? "guaranteedFixedPriceTerms")
2585+ <*> (o .:? "description"))
2586+
2587+instance ToJSON DealTerms where
2588+ toJSON DealTerms{..}
2589+ = object
2590+ (catMaybes
2591+ [("nonGuaranteedFixedPriceTerms" .=) <$>
2592+ _dtNonGuaranteedFixedPriceTerms,
2593+ ("nonGuaranteedAuctionTerms" .=) <$>
2594+ _dtNonGuaranteedAuctionTerms,
2595+ ("guaranteedFixedPriceTerms" .=) <$>
2596+ _dtGuaranteedFixedPriceTerms,
2597+ ("description" .=) <$> _dtDescription])
2598+
19232599--
19242600-- /See:/ 'dealTermsGuaranteedFixedPriceTerms' smart constructor.
19252601data DealTermsGuaranteedFixedPriceTerms = DealTermsGuaranteedFixedPriceTerms
@@ -1967,6 +2643,26 @@ dtgfptFixedPrices
19672643 . _Default
19682644 . _Coerce
19692645
2646+instance FromJSON DealTermsGuaranteedFixedPriceTerms
2647+ where
2648+ parseJSON
2649+ = withObject "DealTermsGuaranteedFixedPriceTerms"
2650+ (\ o ->
2651+ DealTermsGuaranteedFixedPriceTerms <$>
2652+ (o .:? "guaranteedLooks") <*>
2653+ (o .:? "guaranteedImpressions")
2654+ <*> (o .:? "fixedPrices" .!= mempty))
2655+
2656+instance ToJSON DealTermsGuaranteedFixedPriceTerms
2657+ where
2658+ toJSON DealTermsGuaranteedFixedPriceTerms{..}
2659+ = object
2660+ (catMaybes
2661+ [("guaranteedLooks" .=) <$> _dtgfptGuaranteedLooks,
2662+ ("guaranteedImpressions" .=) <$>
2663+ _dtgfptGuaranteedImpressions,
2664+ ("fixedPrices" .=) <$> _dtgfptFixedPrices])
2665+
19702666--
19712667-- /See:/ 'dealTermsNonGuaranteedAuctionTerms' smart constructor.
19722668data DealTermsNonGuaranteedAuctionTerms = DealTermsNonGuaranteedAuctionTerms
@@ -2003,6 +2699,24 @@ dtngatPrivateAuctionId
20032699 = lens _dtngatPrivateAuctionId
20042700 (\ s a -> s{_dtngatPrivateAuctionId = a})
20052701
2702+instance FromJSON DealTermsNonGuaranteedAuctionTerms
2703+ where
2704+ parseJSON
2705+ = withObject "DealTermsNonGuaranteedAuctionTerms"
2706+ (\ o ->
2707+ DealTermsNonGuaranteedAuctionTerms <$>
2708+ (o .:? "reservePricePerBuyers" .!= mempty) <*>
2709+ (o .:? "privateAuctionId"))
2710+
2711+instance ToJSON DealTermsNonGuaranteedAuctionTerms
2712+ where
2713+ toJSON DealTermsNonGuaranteedAuctionTerms{..}
2714+ = object
2715+ (catMaybes
2716+ [("reservePricePerBuyers" .=) <$>
2717+ _dtngatReservePricePerBuyers,
2718+ ("privateAuctionId" .=) <$> _dtngatPrivateAuctionId])
2719+
20062720--
20072721-- /See:/ 'dealTermsNonGuaranteedFixedPriceTerms' smart constructor.
20082722newtype DealTermsNonGuaranteedFixedPriceTerms = DealTermsNonGuaranteedFixedPriceTerms
@@ -2029,6 +2743,21 @@ dtngfptFixedPrices
20292743 . _Default
20302744 . _Coerce
20312745
2746+instance FromJSON
2747+ DealTermsNonGuaranteedFixedPriceTerms where
2748+ parseJSON
2749+ = withObject "DealTermsNonGuaranteedFixedPriceTerms"
2750+ (\ o ->
2751+ DealTermsNonGuaranteedFixedPriceTerms <$>
2752+ (o .:? "fixedPrices" .!= mempty))
2753+
2754+instance ToJSON DealTermsNonGuaranteedFixedPriceTerms
2755+ where
2756+ toJSON DealTermsNonGuaranteedFixedPriceTerms{..}
2757+ = object
2758+ (catMaybes
2759+ [("fixedPrices" .=) <$> _dtngfptFixedPrices])
2760+
20322761--
20332762-- /See:/ 'deleteOrderDealsRequest' smart constructor.
20342763data DeleteOrderDealsRequest = DeleteOrderDealsRequest
@@ -2073,6 +2802,24 @@ dOrderRevisionNumber
20732802 = lens _dOrderRevisionNumber
20742803 (\ s a -> s{_dOrderRevisionNumber = a})
20752804
2805+instance FromJSON DeleteOrderDealsRequest where
2806+ parseJSON
2807+ = withObject "DeleteOrderDealsRequest"
2808+ (\ o ->
2809+ DeleteOrderDealsRequest <$>
2810+ (o .:? "updateAction") <*>
2811+ (o .:? "dealIds" .!= mempty)
2812+ <*> (o .:? "orderRevisionNumber"))
2813+
2814+instance ToJSON DeleteOrderDealsRequest where
2815+ toJSON DeleteOrderDealsRequest{..}
2816+ = object
2817+ (catMaybes
2818+ [("updateAction" .=) <$> _dUpdateAction,
2819+ ("dealIds" .=) <$> _dDealIds,
2820+ ("orderRevisionNumber" .=) <$>
2821+ _dOrderRevisionNumber])
2822+
20762823--
20772824-- /See:/ 'deleteOrderDealsResponse' smart constructor.
20782825data DeleteOrderDealsResponse = DeleteOrderDealsResponse
@@ -2108,6 +2855,22 @@ dodrOrderRevisionNumber
21082855 = lens _dodrOrderRevisionNumber
21092856 (\ s a -> s{_dodrOrderRevisionNumber = a})
21102857
2858+instance FromJSON DeleteOrderDealsResponse where
2859+ parseJSON
2860+ = withObject "DeleteOrderDealsResponse"
2861+ (\ o ->
2862+ DeleteOrderDealsResponse <$>
2863+ (o .:? "deals" .!= mempty) <*>
2864+ (o .:? "orderRevisionNumber"))
2865+
2866+instance ToJSON DeleteOrderDealsResponse where
2867+ toJSON DeleteOrderDealsResponse{..}
2868+ = object
2869+ (catMaybes
2870+ [("deals" .=) <$> _dodrDeals,
2871+ ("orderRevisionNumber" .=) <$>
2872+ _dodrOrderRevisionNumber])
2873+
21112874--
21122875-- /See:/ 'deliveryControl' smart constructor.
21132876data DeliveryControl = DeliveryControl
@@ -2142,6 +2905,21 @@ dcDeliveryRateType
21422905 = lens _dcDeliveryRateType
21432906 (\ s a -> s{_dcDeliveryRateType = a})
21442907
2908+instance FromJSON DeliveryControl where
2909+ parseJSON
2910+ = withObject "DeliveryControl"
2911+ (\ o ->
2912+ DeliveryControl <$>
2913+ (o .:? "frequencyCaps" .!= mempty) <*>
2914+ (o .:? "deliveryRateType"))
2915+
2916+instance ToJSON DeliveryControl where
2917+ toJSON DeliveryControl{..}
2918+ = object
2919+ (catMaybes
2920+ [("frequencyCaps" .=) <$> _dcFrequencyCaps,
2921+ ("deliveryRateType" .=) <$> _dcDeliveryRateType])
2922+
21452923--
21462924-- /See:/ 'deliveryControlFrequencyCap' smart constructor.
21472925data DeliveryControlFrequencyCap = DeliveryControlFrequencyCap
@@ -2183,6 +2961,22 @@ dcfcTimeUnitType
21832961 = lens _dcfcTimeUnitType
21842962 (\ s a -> s{_dcfcTimeUnitType = a})
21852963
2964+instance FromJSON DeliveryControlFrequencyCap where
2965+ parseJSON
2966+ = withObject "DeliveryControlFrequencyCap"
2967+ (\ o ->
2968+ DeliveryControlFrequencyCap <$>
2969+ (o .:? "maxImpressions") <*> (o .:? "numTimeUnits")
2970+ <*> (o .:? "timeUnitType"))
2971+
2972+instance ToJSON DeliveryControlFrequencyCap where
2973+ toJSON DeliveryControlFrequencyCap{..}
2974+ = object
2975+ (catMaybes
2976+ [("maxImpressions" .=) <$> _dcfcMaxImpressions,
2977+ ("numTimeUnits" .=) <$> _dcfcNumTimeUnits,
2978+ ("timeUnitType" .=) <$> _dcfcTimeUnitType])
2979+
21862980--
21872981-- /See:/ 'editAllOrderDealsRequest' smart constructor.
21882982data EditAllOrderDealsRequest = EditAllOrderDealsRequest
@@ -2249,6 +3043,25 @@ eaodrOrderRevisionNumber
22493043 = lens _eaodrOrderRevisionNumber
22503044 (\ s a -> s{_eaodrOrderRevisionNumber = a})
22513045
3046+instance FromJSON EditAllOrderDealsRequest where
3047+ parseJSON
3048+ = withObject "EditAllOrderDealsRequest"
3049+ (\ o ->
3050+ EditAllOrderDealsRequest <$>
3051+ (o .:? "updateAction") <*> (o .:? "deals" .!= mempty)
3052+ <*> (o .:? "order")
3053+ <*> (o .:? "orderRevisionNumber"))
3054+
3055+instance ToJSON EditAllOrderDealsRequest where
3056+ toJSON EditAllOrderDealsRequest{..}
3057+ = object
3058+ (catMaybes
3059+ [("updateAction" .=) <$> _eaodrUpdateAction,
3060+ ("deals" .=) <$> _eaodrDeals,
3061+ ("order" .=) <$> _eaodrOrder,
3062+ ("orderRevisionNumber" .=) <$>
3063+ _eaodrOrderRevisionNumber])
3064+
22523065--
22533066-- /See:/ 'editAllOrderDealsResponse' smart constructor.
22543067newtype EditAllOrderDealsResponse = EditAllOrderDealsResponse
@@ -2273,6 +3086,17 @@ eDeals
22733086 = lens _eDeals (\ s a -> s{_eDeals = a}) . _Default .
22743087 _Coerce
22753088
3089+instance FromJSON EditAllOrderDealsResponse where
3090+ parseJSON
3091+ = withObject "EditAllOrderDealsResponse"
3092+ (\ o ->
3093+ EditAllOrderDealsResponse <$>
3094+ (o .:? "deals" .!= mempty))
3095+
3096+instance ToJSON EditAllOrderDealsResponse where
3097+ toJSON EditAllOrderDealsResponse{..}
3098+ = object (catMaybes [("deals" .=) <$> _eDeals])
3099+
22763100--
22773101-- /See:/ 'editHistoryDto' smart constructor.
22783102data EditHistoryDto = EditHistoryDto
@@ -2323,6 +3147,27 @@ ehdCreatedTimeStamp
23233147 = lens _ehdCreatedTimeStamp
23243148 (\ s a -> s{_ehdCreatedTimeStamp = a})
23253149
3150+instance FromJSON EditHistoryDto where
3151+ parseJSON
3152+ = withObject "EditHistoryDto"
3153+ (\ o ->
3154+ EditHistoryDto <$>
3155+ (o .:? "lastUpdatedByLoginName") <*>
3156+ (o .:? "createdByLoginName")
3157+ <*> (o .:? "lastUpdateTimeStamp")
3158+ <*> (o .:? "createdTimeStamp"))
3159+
3160+instance ToJSON EditHistoryDto where
3161+ toJSON EditHistoryDto{..}
3162+ = object
3163+ (catMaybes
3164+ [("lastUpdatedByLoginName" .=) <$>
3165+ _ehdLastUpdatedByLoginName,
3166+ ("createdByLoginName" .=) <$> _ehdCreatedByLoginName,
3167+ ("lastUpdateTimeStamp" .=) <$>
3168+ _ehdLastUpdateTimeStamp,
3169+ ("createdTimeStamp" .=) <$> _ehdCreatedTimeStamp])
3170+
23263171--
23273172-- /See:/ 'getFinalizedNegotiationByExternalDealIdRequest' smart constructor.
23283173newtype GetFinalizedNegotiationByExternalDealIdRequest = GetFinalizedNegotiationByExternalDealIdRequest
@@ -2346,6 +3191,24 @@ gfnbedirIncludePrivateAuctions
23463191 = lens _gfnbedirIncludePrivateAuctions
23473192 (\ s a -> s{_gfnbedirIncludePrivateAuctions = a})
23483193
3194+instance FromJSON
3195+ GetFinalizedNegotiationByExternalDealIdRequest where
3196+ parseJSON
3197+ = withObject
3198+ "GetFinalizedNegotiationByExternalDealIdRequest"
3199+ (\ o ->
3200+ GetFinalizedNegotiationByExternalDealIdRequest <$>
3201+ (o .:? "includePrivateAuctions"))
3202+
3203+instance ToJSON
3204+ GetFinalizedNegotiationByExternalDealIdRequest where
3205+ toJSON
3206+ GetFinalizedNegotiationByExternalDealIdRequest{..}
3207+ = object
3208+ (catMaybes
3209+ [("includePrivateAuctions" .=) <$>
3210+ _gfnbedirIncludePrivateAuctions])
3211+
23493212--
23503213-- /See:/ 'getNegotiationByIdRequest' smart constructor.
23513214newtype GetNegotiationByIdRequest = GetNegotiationByIdRequest
@@ -2369,6 +3232,20 @@ gnbirIncludePrivateAuctions
23693232 = lens _gnbirIncludePrivateAuctions
23703233 (\ s a -> s{_gnbirIncludePrivateAuctions = a})
23713234
3235+instance FromJSON GetNegotiationByIdRequest where
3236+ parseJSON
3237+ = withObject "GetNegotiationByIdRequest"
3238+ (\ o ->
3239+ GetNegotiationByIdRequest <$>
3240+ (o .:? "includePrivateAuctions"))
3241+
3242+instance ToJSON GetNegotiationByIdRequest where
3243+ toJSON GetNegotiationByIdRequest{..}
3244+ = object
3245+ (catMaybes
3246+ [("includePrivateAuctions" .=) <$>
3247+ _gnbirIncludePrivateAuctions])
3248+
23723249--
23733250-- /See:/ 'getNegotiationsRequest' smart constructor.
23743251data GetNegotiationsRequest = GetNegotiationsRequest
@@ -2409,6 +3286,25 @@ gnrIncludePrivateAuctions
24093286 = lens _gnrIncludePrivateAuctions
24103287 (\ s a -> s{_gnrIncludePrivateAuctions = a})
24113288
3289+instance FromJSON GetNegotiationsRequest where
3290+ parseJSON
3291+ = withObject "GetNegotiationsRequest"
3292+ (\ o ->
3293+ GetNegotiationsRequest <$>
3294+ (o .:? "sinceTimestampMillis") <*>
3295+ (o .:? "finalized")
3296+ <*> (o .:? "includePrivateAuctions"))
3297+
3298+instance ToJSON GetNegotiationsRequest where
3299+ toJSON GetNegotiationsRequest{..}
3300+ = object
3301+ (catMaybes
3302+ [("sinceTimestampMillis" .=) <$>
3303+ _gnrSinceTimestampMillis,
3304+ ("finalized" .=) <$> _gnrFinalized,
3305+ ("includePrivateAuctions" .=) <$>
3306+ _gnrIncludePrivateAuctions])
3307+
24123308--
24133309-- /See:/ 'getNegotiationsResponse' smart constructor.
24143310data GetNegotiationsResponse = GetNegotiationsResponse
@@ -2441,6 +3337,21 @@ gnrNegotiations
24413337 . _Default
24423338 . _Coerce
24433339
3340+instance FromJSON GetNegotiationsResponse where
3341+ parseJSON
3342+ = withObject "GetNegotiationsResponse"
3343+ (\ o ->
3344+ GetNegotiationsResponse <$>
3345+ (o .:? "kind" .!= "adexchangebuyer#negotiationsList")
3346+ <*> (o .:? "negotiations" .!= mempty))
3347+
3348+instance ToJSON GetNegotiationsResponse where
3349+ toJSON GetNegotiationsResponse{..}
3350+ = object
3351+ (catMaybes
3352+ [Just ("kind" .= _gnrKind),
3353+ ("negotiations" .=) <$> _gnrNegotiations])
3354+
24443355--
24453356-- /See:/ 'getOffersResponse' smart constructor.
24463357newtype GetOffersResponse = GetOffersResponse
@@ -2466,6 +3377,16 @@ gorOffers
24663377 _Default
24673378 . _Coerce
24683379
3380+instance FromJSON GetOffersResponse where
3381+ parseJSON
3382+ = withObject "GetOffersResponse"
3383+ (\ o ->
3384+ GetOffersResponse <$> (o .:? "offers" .!= mempty))
3385+
3386+instance ToJSON GetOffersResponse where
3387+ toJSON GetOffersResponse{..}
3388+ = object (catMaybes [("offers" .=) <$> _gorOffers])
3389+
24693390--
24703391-- /See:/ 'getOrderDealsResponse' smart constructor.
24713392newtype GetOrderDealsResponse = GetOrderDealsResponse
@@ -2491,6 +3412,16 @@ godrDeals
24913412 _Default
24923413 . _Coerce
24933414
3415+instance FromJSON GetOrderDealsResponse where
3416+ parseJSON
3417+ = withObject "GetOrderDealsResponse"
3418+ (\ o ->
3419+ GetOrderDealsResponse <$> (o .:? "deals" .!= mempty))
3420+
3421+instance ToJSON GetOrderDealsResponse where
3422+ toJSON GetOrderDealsResponse{..}
3423+ = object (catMaybes [("deals" .=) <$> _godrDeals])
3424+
24943425--
24953426-- /See:/ 'getOrderNotesResponse' smart constructor.
24963427newtype GetOrderNotesResponse = GetOrderNotesResponse
@@ -2516,6 +3447,16 @@ gonrNotes
25163447 _Default
25173448 . _Coerce
25183449
3450+instance FromJSON GetOrderNotesResponse where
3451+ parseJSON
3452+ = withObject "GetOrderNotesResponse"
3453+ (\ o ->
3454+ GetOrderNotesResponse <$> (o .:? "notes" .!= mempty))
3455+
3456+instance ToJSON GetOrderNotesResponse where
3457+ toJSON GetOrderNotesResponse{..}
3458+ = object (catMaybes [("notes" .=) <$> _gonrNotes])
3459+
25193460--
25203461-- /See:/ 'getOrdersResponse' smart constructor.
25213462newtype GetOrdersResponse = GetOrdersResponse
@@ -2541,6 +3482,16 @@ gorOrders
25413482 _Default
25423483 . _Coerce
25433484
3485+instance FromJSON GetOrdersResponse where
3486+ parseJSON
3487+ = withObject "GetOrdersResponse"
3488+ (\ o ->
3489+ GetOrdersResponse <$> (o .:? "orders" .!= mempty))
3490+
3491+instance ToJSON GetOrdersResponse where
3492+ toJSON GetOrdersResponse{..}
3493+ = object (catMaybes [("orders" .=) <$> _gorOrders])
3494+
25443495--
25453496-- /See:/ 'inventorySegmentTargeting' smart constructor.
25463497data InventorySegmentTargeting = InventorySegmentTargeting
@@ -2951,6 +3902,114 @@ istNegativeIcmInterests
29513902 . _Default
29523903 . _Coerce
29533904
3905+instance FromJSON InventorySegmentTargeting where
3906+ parseJSON
3907+ = withObject "InventorySegmentTargeting"
3908+ (\ o ->
3909+ InventorySegmentTargeting <$>
3910+ (o .:? "negativeVideoDurationSegments" .!= mempty)
3911+ <*> (o .:? "negativeIcmBrands" .!= mempty)
3912+ <*> (o .:? "negativeKeyValues" .!= mempty)
3913+ <*> (o .:? "positiveAudienceSegments" .!= mempty)
3914+ <*> (o .:? "positiveXfpPlacements" .!= mempty)
3915+ <*> (o .:? "negativeXfpAdSlots" .!= mempty)
3916+ <*>
3917+ (o .:? "positiveOperatingSystemVersions" .!= mempty)
3918+ <*> (o .:? "positiveSizes" .!= mempty)
3919+ <*> (o .:? "positiveDeviceCategories" .!= mempty)
3920+ <*> (o .:? "positiveLocations" .!= mempty)
3921+ <*> (o .:? "negativeAdSizes" .!= mempty)
3922+ <*> (o .:? "positiveOperatingSystems" .!= mempty)
3923+ <*> (o .:? "positiveSiteUrls" .!= mempty)
3924+ <*> (o .:? "negativeInventorySlots" .!= mempty)
3925+ <*>
3926+ (o .:? "negativeVideoAdPositionSegments" .!= mempty)
3927+ <*> (o .:? "positiveAdTypeSegments" .!= mempty)
3928+ <*> (o .:? "positiveIcmInterests" .!= mempty)
3929+ <*> (o .:? "positiveMobileApps" .!= mempty)
3930+ <*> (o .:? "positiveKeyValues" .!= mempty)
3931+ <*> (o .:? "positiveIcmBrands" .!= mempty)
3932+ <*>
3933+ (o .:? "positiveVideoDurationSegments" .!= mempty)
3934+ <*> (o .:? "negativeAudienceSegments" .!= mempty)
3935+ <*> (o .:? "negativeXfpPlacements" .!= mempty)
3936+ <*> (o .:? "positiveXfpAdSlots" .!= mempty)
3937+ <*>
3938+ (o .:? "negativeOperatingSystemVersions" .!= mempty)
3939+ <*> (o .:? "negativeSizes" .!= mempty)
3940+ <*> (o .:? "negativeLocations" .!= mempty)
3941+ <*> (o .:? "negativeDeviceCategories" .!= mempty)
3942+ <*> (o .:? "negativeOperatingSystems" .!= mempty)
3943+ <*> (o .:? "positiveAdSizes" .!= mempty)
3944+ <*> (o .:? "negativeSiteUrls" .!= mempty)
3945+ <*> (o .:? "negativeAdTypeSegments" .!= mempty)
3946+ <*>
3947+ (o .:? "positiveVideoAdPositionSegments" .!= mempty)
3948+ <*> (o .:? "positiveInventorySlots" .!= mempty)
3949+ <*> (o .:? "negativeMobileApps" .!= mempty)
3950+ <*> (o .:? "negativeIcmInterests" .!= mempty))
3951+
3952+instance ToJSON InventorySegmentTargeting where
3953+ toJSON InventorySegmentTargeting{..}
3954+ = object
3955+ (catMaybes
3956+ [("negativeVideoDurationSegments" .=) <$>
3957+ _istNegativeVideoDurationSegments,
3958+ ("negativeIcmBrands" .=) <$> _istNegativeIcmBrands,
3959+ ("negativeKeyValues" .=) <$> _istNegativeKeyValues,
3960+ ("positiveAudienceSegments" .=) <$>
3961+ _istPositiveAudienceSegments,
3962+ ("positiveXfpPlacements" .=) <$>
3963+ _istPositiveXfpPlacements,
3964+ ("negativeXfpAdSlots" .=) <$> _istNegativeXfpAdSlots,
3965+ ("positiveOperatingSystemVersions" .=) <$>
3966+ _istPositiveOperatingSystemVersions,
3967+ ("positiveSizes" .=) <$> _istPositiveSizes,
3968+ ("positiveDeviceCategories" .=) <$>
3969+ _istPositiveDeviceCategories,
3970+ ("positiveLocations" .=) <$> _istPositiveLocations,
3971+ ("negativeAdSizes" .=) <$> _istNegativeAdSizes,
3972+ ("positiveOperatingSystems" .=) <$>
3973+ _istPositiveOperatingSystems,
3974+ ("positiveSiteUrls" .=) <$> _istPositiveSiteUrls,
3975+ ("negativeInventorySlots" .=) <$>
3976+ _istNegativeInventorySlots,
3977+ ("negativeVideoAdPositionSegments" .=) <$>
3978+ _istNegativeVideoAdPositionSegments,
3979+ ("positiveAdTypeSegments" .=) <$>
3980+ _istPositiveAdTypeSegments,
3981+ ("positiveIcmInterests" .=) <$>
3982+ _istPositiveIcmInterests,
3983+ ("positiveMobileApps" .=) <$> _istPositiveMobileApps,
3984+ ("positiveKeyValues" .=) <$> _istPositiveKeyValues,
3985+ ("positiveIcmBrands" .=) <$> _istPositiveIcmBrands,
3986+ ("positiveVideoDurationSegments" .=) <$>
3987+ _istPositiveVideoDurationSegments,
3988+ ("negativeAudienceSegments" .=) <$>
3989+ _istNegativeAudienceSegments,
3990+ ("negativeXfpPlacements" .=) <$>
3991+ _istNegativeXfpPlacements,
3992+ ("positiveXfpAdSlots" .=) <$> _istPositiveXfpAdSlots,
3993+ ("negativeOperatingSystemVersions" .=) <$>
3994+ _istNegativeOperatingSystemVersions,
3995+ ("negativeSizes" .=) <$> _istNegativeSizes,
3996+ ("negativeLocations" .=) <$> _istNegativeLocations,
3997+ ("negativeDeviceCategories" .=) <$>
3998+ _istNegativeDeviceCategories,
3999+ ("negativeOperatingSystems" .=) <$>
4000+ _istNegativeOperatingSystems,
4001+ ("positiveAdSizes" .=) <$> _istPositiveAdSizes,
4002+ ("negativeSiteUrls" .=) <$> _istNegativeSiteUrls,
4003+ ("negativeAdTypeSegments" .=) <$>
4004+ _istNegativeAdTypeSegments,
4005+ ("positiveVideoAdPositionSegments" .=) <$>
4006+ _istPositiveVideoAdPositionSegments,
4007+ ("positiveInventorySlots" .=) <$>
4008+ _istPositiveInventorySlots,
4009+ ("negativeMobileApps" .=) <$> _istNegativeMobileApps,
4010+ ("negativeIcmInterests" .=) <$>
4011+ _istNegativeIcmInterests])
4012+
29544013--
29554014-- /See:/ 'listClientAccessCapabilitiesRequest' smart constructor.
29564015newtype ListClientAccessCapabilitiesRequest = ListClientAccessCapabilitiesRequest
@@ -2974,6 +4033,21 @@ lcacrSponsorAccountId
29744033 = lens _lcacrSponsorAccountId
29754034 (\ s a -> s{_lcacrSponsorAccountId = a})
29764035
4036+instance FromJSON ListClientAccessCapabilitiesRequest
4037+ where
4038+ parseJSON
4039+ = withObject "ListClientAccessCapabilitiesRequest"
4040+ (\ o ->
4041+ ListClientAccessCapabilitiesRequest <$>
4042+ (o .:? "sponsorAccountId"))
4043+
4044+instance ToJSON ListClientAccessCapabilitiesRequest
4045+ where
4046+ toJSON ListClientAccessCapabilitiesRequest{..}
4047+ = object
4048+ (catMaybes
4049+ [("sponsorAccountId" .=) <$> _lcacrSponsorAccountId])
4050+
29774051--
29784052-- /See:/ 'listClientAccessCapabilitiesResponse' smart constructor.
29794053newtype ListClientAccessCapabilitiesResponse = ListClientAccessCapabilitiesResponse
@@ -2999,6 +4073,22 @@ lcacrClientAccessPermissions
29994073 . _Default
30004074 . _Coerce
30014075
4076+instance FromJSON
4077+ ListClientAccessCapabilitiesResponse where
4078+ parseJSON
4079+ = withObject "ListClientAccessCapabilitiesResponse"
4080+ (\ o ->
4081+ ListClientAccessCapabilitiesResponse <$>
4082+ (o .:? "clientAccessPermissions" .!= mempty))
4083+
4084+instance ToJSON ListClientAccessCapabilitiesResponse
4085+ where
4086+ toJSON ListClientAccessCapabilitiesResponse{..}
4087+ = object
4088+ (catMaybes
4089+ [("clientAccessPermissions" .=) <$>
4090+ _lcacrClientAccessPermissions])
4091+
30024092--
30034093-- /See:/ 'listOffersRequest' smart constructor.
30044094newtype ListOffersRequest = ListOffersRequest
@@ -3022,6 +4112,19 @@ lorSinceTimestampMillis
30224112 = lens _lorSinceTimestampMillis
30234113 (\ s a -> s{_lorSinceTimestampMillis = a})
30244114
4115+instance FromJSON ListOffersRequest where
4116+ parseJSON
4117+ = withObject "ListOffersRequest"
4118+ (\ o ->
4119+ ListOffersRequest <$> (o .:? "sinceTimestampMillis"))
4120+
4121+instance ToJSON ListOffersRequest where
4122+ toJSON ListOffersRequest{..}
4123+ = object
4124+ (catMaybes
4125+ [("sinceTimestampMillis" .=) <$>
4126+ _lorSinceTimestampMillis])
4127+
30254128--
30264129-- /See:/ 'listOffersResponse' smart constructor.
30274130data ListOffersResponse = ListOffersResponse
@@ -3053,6 +4156,21 @@ lorOffers
30534156 _Default
30544157 . _Coerce
30554158
4159+instance FromJSON ListOffersResponse where
4160+ parseJSON
4161+ = withObject "ListOffersResponse"
4162+ (\ o ->
4163+ ListOffersResponse <$>
4164+ (o .:? "kind" .!= "adexchangebuyer#offersList") <*>
4165+ (o .:? "offers" .!= mempty))
4166+
4167+instance ToJSON ListOffersResponse where
4168+ toJSON ListOffersResponse{..}
4169+ = object
4170+ (catMaybes
4171+ [Just ("kind" .= _lorKind),
4172+ ("offers" .=) <$> _lorOffers])
4173+
30564174-- | An order can contain multiple deals. A deal contains the terms and
30574175-- targeting information that is used for serving.
30584176--
@@ -3261,6 +4379,58 @@ mdOrderId :: Lens' MarketplaceDeal (Maybe Text)
32614379mdOrderId
32624380 = lens _mdOrderId (\ s a -> s{_mdOrderId = a})
32634381
4382+instance FromJSON MarketplaceDeal where
4383+ parseJSON
4384+ = withObject "MarketplaceDeal"
4385+ (\ o ->
4386+ MarketplaceDeal <$>
4387+ (o .:? "externalDealId") <*>
4388+ (o .:? "buyerPrivateData")
4389+ <*> (o .:? "webPropertyCode")
4390+ <*> (o .:? "creationTimeMs")
4391+ <*> (o .:? "terms")
4392+ <*> (o .:? "offerRevisionNumber")
4393+ <*> (o .:? "lastUpdateTimeMs")
4394+ <*>
4395+ (o .:? "kind" .!= "adexchangebuyer#marketplaceDeal")
4396+ <*> (o .:? "deliveryControl")
4397+ <*> (o .:? "flightStartTimeMs")
4398+ <*> (o .:? "sharedTargetings" .!= mempty)
4399+ <*> (o .:? "dealId")
4400+ <*> (o .:? "inventoryDescription")
4401+ <*> (o .:? "syndicationProduct")
4402+ <*> (o .:? "flightEndTimeMs")
4403+ <*> (o .:? "name")
4404+ <*> (o .:? "sellerContacts" .!= mempty)
4405+ <*> (o .:? "offerId")
4406+ <*> (o .:? "orderId"))
4407+
4408+instance ToJSON MarketplaceDeal where
4409+ toJSON MarketplaceDeal{..}
4410+ = object
4411+ (catMaybes
4412+ [("externalDealId" .=) <$> _mdExternalDealId,
4413+ ("buyerPrivateData" .=) <$> _mdBuyerPrivateData,
4414+ ("webPropertyCode" .=) <$> _mdWebPropertyCode,
4415+ ("creationTimeMs" .=) <$> _mdCreationTimeMs,
4416+ ("terms" .=) <$> _mdTerms,
4417+ ("offerRevisionNumber" .=) <$>
4418+ _mdOfferRevisionNumber,
4419+ ("lastUpdateTimeMs" .=) <$> _mdLastUpdateTimeMs,
4420+ Just ("kind" .= _mdKind),
4421+ ("deliveryControl" .=) <$> _mdDeliveryControl,
4422+ ("flightStartTimeMs" .=) <$> _mdFlightStartTimeMs,
4423+ ("sharedTargetings" .=) <$> _mdSharedTargetings,
4424+ ("dealId" .=) <$> _mdDealId,
4425+ ("inventoryDescription" .=) <$>
4426+ _mdInventoryDescription,
4427+ ("syndicationProduct" .=) <$> _mdSyndicationProduct,
4428+ ("flightEndTimeMs" .=) <$> _mdFlightEndTimeMs,
4429+ ("name" .=) <$> _mdName,
4430+ ("sellerContacts" .=) <$> _mdSellerContacts,
4431+ ("offerId" .=) <$> _mdOfferId,
4432+ ("orderId" .=) <$> _mdOrderId])
4433+
32644434--
32654435-- /See:/ 'marketplaceDealParty' smart constructor.
32664436data MarketplaceDealParty = MarketplaceDealParty
@@ -3294,6 +4464,20 @@ mdpSeller
32944464mdpBuyer :: Lens' MarketplaceDealParty (Maybe (Maybe Buyer))
32954465mdpBuyer = lens _mdpBuyer (\ s a -> s{_mdpBuyer = a})
32964466
4467+instance FromJSON MarketplaceDealParty where
4468+ parseJSON
4469+ = withObject "MarketplaceDealParty"
4470+ (\ o ->
4471+ MarketplaceDealParty <$>
4472+ (o .:? "seller") <*> (o .:? "buyer"))
4473+
4474+instance ToJSON MarketplaceDealParty where
4475+ toJSON MarketplaceDealParty{..}
4476+ = object
4477+ (catMaybes
4478+ [("seller" .=) <$> _mdpSeller,
4479+ ("buyer" .=) <$> _mdpBuyer])
4480+
32974481--
32984482-- /See:/ 'marketplaceLabel' smart constructor.
32994483data MarketplaceLabel = MarketplaceLabel
@@ -3345,6 +4529,26 @@ mlCreateTimeMs
33454529mlLabel :: Lens' MarketplaceLabel (Maybe Text)
33464530mlLabel = lens _mlLabel (\ s a -> s{_mlLabel = a})
33474531
4532+instance FromJSON MarketplaceLabel where
4533+ parseJSON
4534+ = withObject "MarketplaceLabel"
4535+ (\ o ->
4536+ MarketplaceLabel <$>
4537+ (o .:? "deprecatedMarketplaceDealParty") <*>
4538+ (o .:? "accountId")
4539+ <*> (o .:? "createTimeMs")
4540+ <*> (o .:? "label"))
4541+
4542+instance ToJSON MarketplaceLabel where
4543+ toJSON MarketplaceLabel{..}
4544+ = object
4545+ (catMaybes
4546+ [("deprecatedMarketplaceDealParty" .=) <$>
4547+ _mlDeprecatedMarketplaceDealParty,
4548+ ("accountId" .=) <$> _mlAccountId,
4549+ ("createTimeMs" .=) <$> _mlCreateTimeMs,
4550+ ("label" .=) <$> _mlLabel])
4551+
33484552-- | An order is associated with a bunch of notes which may optionally be
33494553-- associated with a deal and\/or revision number.
33504554--
@@ -3435,6 +4639,33 @@ mnOrderRevisionNumber
34354639 = lens _mnOrderRevisionNumber
34364640 (\ s a -> s{_mnOrderRevisionNumber = a})
34374641
4642+instance FromJSON MarketplaceNote where
4643+ parseJSON
4644+ = withObject "MarketplaceNote"
4645+ (\ o ->
4646+ MarketplaceNote <$>
4647+ (o .:? "note") <*>
4648+ (o .:? "kind" .!= "adexchangebuyer#marketplaceNote")
4649+ <*> (o .:? "timestampMs")
4650+ <*> (o .:? "dealId")
4651+ <*> (o .:? "noteId")
4652+ <*> (o .:? "creatorRole")
4653+ <*> (o .:? "orderId")
4654+ <*> (o .:? "orderRevisionNumber"))
4655+
4656+instance ToJSON MarketplaceNote where
4657+ toJSON MarketplaceNote{..}
4658+ = object
4659+ (catMaybes
4660+ [("note" .=) <$> _mnNote, Just ("kind" .= _mnKind),
4661+ ("timestampMs" .=) <$> _mnTimestampMs,
4662+ ("dealId" .=) <$> _mnDealId,
4663+ ("noteId" .=) <$> _mnNoteId,
4664+ ("creatorRole" .=) <$> _mnCreatorRole,
4665+ ("orderId" .=) <$> _mnOrderId,
4666+ ("orderRevisionNumber" .=) <$>
4667+ _mnOrderRevisionNumber])
4668+
34384669-- | An offer is segment of inventory that a seller wishes to sell. It is
34394670-- associated with certain terms and targeting information which helps
34404671-- buyer know more about the inventory. Each field in an order can have one
@@ -3629,6 +4860,52 @@ moLabels
36294860 _Default
36304861 . _Coerce
36314862
4863+instance FromJSON MarketplaceOffer where
4864+ parseJSON
4865+ = withObject "MarketplaceOffer"
4866+ (\ o ->
4867+ MarketplaceOffer <$>
4868+ (o .:? "state") <*> (o .:? "webPropertyCode") <*>
4869+ (o .:? "creationTimeMs")
4870+ <*> (o .:? "terms")
4871+ <*> (o .:? "lastUpdateTimeMs")
4872+ <*>
4873+ (o .:? "kind" .!= "adexchangebuyer#marketplaceOffer")
4874+ <*> (o .:? "revisionNumber")
4875+ <*> (o .:? "hasCreatorSignedOff")
4876+ <*> (o .:? "flightStartTimeMs")
4877+ <*> (o .:? "sharedTargetings" .!= mempty)
4878+ <*> (o .:? "seller")
4879+ <*> (o .:? "syndicationProduct")
4880+ <*> (o .:? "flightEndTimeMs")
4881+ <*> (o .:? "name")
4882+ <*> (o .:? "creatorContacts" .!= mempty)
4883+ <*> (o .:? "offerId")
4884+ <*> (o .:? "labels" .!= mempty))
4885+
4886+instance ToJSON MarketplaceOffer where
4887+ toJSON MarketplaceOffer{..}
4888+ = object
4889+ (catMaybes
4890+ [("state" .=) <$> _moState,
4891+ ("webPropertyCode" .=) <$> _moWebPropertyCode,
4892+ ("creationTimeMs" .=) <$> _moCreationTimeMs,
4893+ ("terms" .=) <$> _moTerms,
4894+ ("lastUpdateTimeMs" .=) <$> _moLastUpdateTimeMs,
4895+ Just ("kind" .= _moKind),
4896+ ("revisionNumber" .=) <$> _moRevisionNumber,
4897+ ("hasCreatorSignedOff" .=) <$>
4898+ _moHasCreatorSignedOff,
4899+ ("flightStartTimeMs" .=) <$> _moFlightStartTimeMs,
4900+ ("sharedTargetings" .=) <$> _moSharedTargetings,
4901+ ("seller" .=) <$> _moSeller,
4902+ ("syndicationProduct" .=) <$> _moSyndicationProduct,
4903+ ("flightEndTimeMs" .=) <$> _moFlightEndTimeMs,
4904+ ("name" .=) <$> _moName,
4905+ ("creatorContacts" .=) <$> _moCreatorContacts,
4906+ ("offerId" .=) <$> _moOfferId,
4907+ ("labels" .=) <$> _moLabels])
4908+
36324909-- | Represents an order in the marketplace. An order is the unit of
36334910-- negotiation between a seller and a buyer and contains deals which are
36344911-- served. Each field in an order can have one of the following setting:
@@ -3848,6 +5125,59 @@ mHasBuyerSignedOff
38485125mBuyer :: Lens' MarketplaceOrder (Maybe (Maybe Buyer))
38495126mBuyer = lens _mBuyer (\ s a -> s{_mBuyer = a})
38505127
5128+instance FromJSON MarketplaceOrder where
5129+ parseJSON
5130+ = withObject "MarketplaceOrder"
5131+ (\ o ->
5132+ MarketplaceOrder <$>
5133+ (o .:? "buyerPrivateData") <*>
5134+ (o .:? "isSetupComplete")
5135+ <*> (o .:? "buyerContacts" .!= mempty)
5136+ <*>
5137+ (o .:? "kind" .!= "adexchangebuyer#marketplaceOrder")
5138+ <*> (o .:? "originatorRole")
5139+ <*> (o .:? "revisionNumber")
5140+ <*> (o .:? "billedBuyer")
5141+ <*> (o .:? "isRenegotiating")
5142+ <*> (o .:? "hasSellerSignedOff")
5143+ <*> (o .:? "seller")
5144+ <*> (o .:? "orderState")
5145+ <*> (o .:? "name")
5146+ <*> (o .:? "sellerContacts" .!= mempty)
5147+ <*> (o .:? "lastUpdaterRole")
5148+ <*> (o .:? "labels" .!= mempty)
5149+ <*> (o .:? "revisionTimeMs")
5150+ <*> (o .:? "orderId")
5151+ <*> (o .:? "lastUpdaterOrCommentorRole")
5152+ <*> (o .:? "hasBuyerSignedOff")
5153+ <*> (o .:? "buyer"))
5154+
5155+instance ToJSON MarketplaceOrder where
5156+ toJSON MarketplaceOrder{..}
5157+ = object
5158+ (catMaybes
5159+ [("buyerPrivateData" .=) <$> _mBuyerPrivateData,
5160+ ("isSetupComplete" .=) <$> _mIsSetupComplete,
5161+ ("buyerContacts" .=) <$> _mBuyerContacts,
5162+ Just ("kind" .= _mKind),
5163+ ("originatorRole" .=) <$> _mOriginatorRole,
5164+ ("revisionNumber" .=) <$> _mRevisionNumber,
5165+ ("billedBuyer" .=) <$> _mBilledBuyer,
5166+ ("isRenegotiating" .=) <$> _mIsRenegotiating,
5167+ ("hasSellerSignedOff" .=) <$> _mHasSellerSignedOff,
5168+ ("seller" .=) <$> _mSeller,
5169+ ("orderState" .=) <$> _mOrderState,
5170+ ("name" .=) <$> _mName,
5171+ ("sellerContacts" .=) <$> _mSellerContacts,
5172+ ("lastUpdaterRole" .=) <$> _mLastUpdaterRole,
5173+ ("labels" .=) <$> _mLabels,
5174+ ("revisionTimeMs" .=) <$> _mRevisionTimeMs,
5175+ ("orderId" .=) <$> _mOrderId,
5176+ ("lastUpdaterOrCommentorRole" .=) <$>
5177+ _mLastUpdaterOrCommentorRole,
5178+ ("hasBuyerSignedOff" .=) <$> _mHasBuyerSignedOff,
5179+ ("buyer" .=) <$> _mBuyer])
5180+
38515181--
38525182-- /See:/ 'moneyDto' smart constructor.
38535183data MoneyDto = MoneyDto
@@ -3878,6 +5208,20 @@ mdCurrencyCode
38785208mdMicros :: Lens' MoneyDto (Maybe Int64)
38795209mdMicros = lens _mdMicros (\ s a -> s{_mdMicros = a})
38805210
5211+instance FromJSON MoneyDto where
5212+ parseJSON
5213+ = withObject "MoneyDto"
5214+ (\ o ->
5215+ MoneyDto <$>
5216+ (o .:? "currencyCode") <*> (o .:? "micros"))
5217+
5218+instance ToJSON MoneyDto where
5219+ toJSON MoneyDto{..}
5220+ = object
5221+ (catMaybes
5222+ [("currencyCode" .=) <$> _mdCurrencyCode,
5223+ ("micros" .=) <$> _mdMicros])
5224+
38815225--
38825226-- /See:/ 'negotiationDto' smart constructor.
38835227data NegotiationDto = NegotiationDto
@@ -4036,6 +5380,48 @@ ndSellerEmailContacts
40365380ndBuyer :: Lens' NegotiationDto (Maybe (Maybe DealPartyDto))
40375381ndBuyer = lens _ndBuyer (\ s a -> s{_ndBuyer = a})
40385382
5383+instance FromJSON NegotiationDto where
5384+ parseJSON
5385+ = withObject "NegotiationDto"
5386+ (\ o ->
5387+ NegotiationDto <$>
5388+ (o .:? "negotiationState") <*>
5389+ (o .:? "externalDealId")
5390+ <*> (o .:? "status")
5391+ <*> (o .:? "dealType")
5392+ <*> (o .:? "negotiationRounds" .!= mempty)
5393+ <*> (o .:? "kind" .!= "adexchangebuyer#negotiation")
5394+ <*> (o .:? "billedBuyer")
5395+ <*> (o .:? "buyerEmailContacts" .!= mempty)
5396+ <*> (o .:? "stats")
5397+ <*> (o .:? "seller")
5398+ <*> (o .:? "labelNames" .!= mempty)
5399+ <*> (o .:? "offerId")
5400+ <*> (o .:? "negotiationId")
5401+ <*> (o .:? "sellerEmailContacts" .!= mempty)
5402+ <*> (o .:? "buyer"))
5403+
5404+instance ToJSON NegotiationDto where
5405+ toJSON NegotiationDto{..}
5406+ = object
5407+ (catMaybes
5408+ [("negotiationState" .=) <$> _ndNegotiationState,
5409+ ("externalDealId" .=) <$> _ndExternalDealId,
5410+ ("status" .=) <$> _ndStatus,
5411+ ("dealType" .=) <$> _ndDealType,
5412+ ("negotiationRounds" .=) <$> _ndNegotiationRounds,
5413+ Just ("kind" .= _ndKind),
5414+ ("billedBuyer" .=) <$> _ndBilledBuyer,
5415+ ("buyerEmailContacts" .=) <$> _ndBuyerEmailContacts,
5416+ ("stats" .=) <$> _ndStats,
5417+ ("seller" .=) <$> _ndSeller,
5418+ ("labelNames" .=) <$> _ndLabelNames,
5419+ ("offerId" .=) <$> _ndOfferId,
5420+ ("negotiationId" .=) <$> _ndNegotiationId,
5421+ ("sellerEmailContacts" .=) <$>
5422+ _ndSellerEmailContacts,
5423+ ("buyer" .=) <$> _ndBuyer])
5424+
40395425--
40405426-- /See:/ 'negotiationRoundDto' smart constructor.
40415427data NegotiationRoundDto = NegotiationRoundDto
@@ -4132,6 +5518,35 @@ nrdRoundNumber
41325518 = lens _nrdRoundNumber
41335519 (\ s a -> s{_nrdRoundNumber = a})
41345520
5521+instance FromJSON NegotiationRoundDto where
5522+ parseJSON
5523+ = withObject "NegotiationRoundDto"
5524+ (\ o ->
5525+ NegotiationRoundDto <$>
5526+ (o .:? "terms") <*>
5527+ (o .:? "kind" .!= "adexchangebuyer#negotiationRound")
5528+ <*> (o .:? "originatorRole")
5529+ <*> (o .:? "action")
5530+ <*> (o .:? "dbmPartnerId")
5531+ <*> (o .:? "notes")
5532+ <*> (o .:? "negotiationId")
5533+ <*> (o .:? "editHistory")
5534+ <*> (o .:? "roundNumber"))
5535+
5536+instance ToJSON NegotiationRoundDto where
5537+ toJSON NegotiationRoundDto{..}
5538+ = object
5539+ (catMaybes
5540+ [("terms" .=) <$> _nrdTerms,
5541+ Just ("kind" .= _nrdKind),
5542+ ("originatorRole" .=) <$> _nrdOriginatorRole,
5543+ ("action" .=) <$> _nrdAction,
5544+ ("dbmPartnerId" .=) <$> _nrdDbmPartnerId,
5545+ ("notes" .=) <$> _nrdNotes,
5546+ ("negotiationId" .=) <$> _nrdNegotiationId,
5547+ ("editHistory" .=) <$> _nrdEditHistory,
5548+ ("roundNumber" .=) <$> _nrdRoundNumber])
5549+
41355550--
41365551-- /See:/ 'offerDto' smart constructor.
41375552data OfferDto = OfferDto
@@ -4281,6 +5696,44 @@ odAnonymous
42815696odIsOpen :: Lens' OfferDto (Maybe Bool)
42825697odIsOpen = lens _odIsOpen (\ s a -> s{_odIsOpen = a})
42835698
5699+instance FromJSON OfferDto where
5700+ parseJSON
5701+ = withObject "OfferDto"
5702+ (\ o ->
5703+ OfferDto <$>
5704+ (o .:? "creator") <*> (o .:? "status") <*>
5705+ (o .:? "offerState")
5706+ <*> (o .:? "pointOfContact")
5707+ <*> (o .:? "terms")
5708+ <*> (o .:? "kind" .!= "adexchangebuyer#offer")
5709+ <*> (o .:? "billedBuyer")
5710+ <*> (o .:? "openToDealParties" .!= mempty)
5711+ <*> (o .:? "emailContacts" .!= mempty)
5712+ <*> (o .:? "labelNames" .!= mempty)
5713+ <*> (o .:? "offerId")
5714+ <*> (o .:? "closedToDealParties" .!= mempty)
5715+ <*> (o .:? "anonymous")
5716+ <*> (o .:? "isOpen"))
5717+
5718+instance ToJSON OfferDto where
5719+ toJSON OfferDto{..}
5720+ = object
5721+ (catMaybes
5722+ [("creator" .=) <$> _odCreator,
5723+ ("status" .=) <$> _odStatus,
5724+ ("offerState" .=) <$> _odOfferState,
5725+ ("pointOfContact" .=) <$> _odPointOfContact,
5726+ ("terms" .=) <$> _odTerms, Just ("kind" .= _odKind),
5727+ ("billedBuyer" .=) <$> _odBilledBuyer,
5728+ ("openToDealParties" .=) <$> _odOpenToDealParties,
5729+ ("emailContacts" .=) <$> _odEmailContacts,
5730+ ("labelNames" .=) <$> _odLabelNames,
5731+ ("offerId" .=) <$> _odOfferId,
5732+ ("closedToDealParties" .=) <$>
5733+ _odClosedToDealParties,
5734+ ("anonymous" .=) <$> _odAnonymous,
5735+ ("isOpen" .=) <$> _odIsOpen])
5736+
42845737-- | The configuration data for an Ad Exchange performance report list.
42855738--
42865739-- /See:/ 'performanceReport' smart constructor.
@@ -4525,6 +5978,72 @@ prOutOfQuota :: Lens' PerformanceReport (Maybe Double)
45255978prOutOfQuota
45265979 = lens _prOutOfQuota (\ s a -> s{_prOutOfQuota = a})
45275980
5981+instance FromJSON PerformanceReport where
5982+ parseJSON
5983+ = withObject "PerformanceReport"
5984+ (\ o ->
5985+ PerformanceReport <$>
5986+ (o .:? "filteredBidRate") <*>
5987+ (o .:? "kind" .!=
5988+ "adexchangebuyer#performanceReport")
5989+ <*> (o .:? "latency95thPercentile")
5990+ <*> (o .:? "cookieMatcherStatusRate" .!= mempty)
5991+ <*> (o .:? "hostedMatchStatusRate" .!= mempty)
5992+ <*> (o .:? "unsuccessfulRequestRate")
5993+ <*> (o .:? "bidRequestRate")
5994+ <*> (o .:? "quotaThrottledLimit")
5995+ <*> (o .:? "quotaConfiguredLimit")
5996+ <*> (o .:? "successfulRequestRate")
5997+ <*> (o .:? "latency85thPercentile")
5998+ <*> (o .:? "calloutStatusRate" .!= mempty)
5999+ <*> (o .:? "latency50thPercentile")
6000+ <*> (o .:? "bidRate")
6001+ <*> (o .:? "creativeStatusRate" .!= mempty)
6002+ <*> (o .:? "noQuotaInRegion")
6003+ <*> (o .:? "region")
6004+ <*> (o .:? "inventoryMatchRate")
6005+ <*> (o .:? "pixelMatchResponses")
6006+ <*> (o .:? "timestamp")
6007+ <*> (o .:? "pixelMatchRequests")
6008+ <*> (o .:? "outOfQuota"))
6009+
6010+instance ToJSON PerformanceReport where
6011+ toJSON PerformanceReport{..}
6012+ = object
6013+ (catMaybes
6014+ [("filteredBidRate" .=) <$> _prFilteredBidRate,
6015+ Just ("kind" .= _prKind),
6016+ ("latency95thPercentile" .=) <$>
6017+ _prLatency95thPercentile,
6018+ ("cookieMatcherStatusRate" .=) <$>
6019+ _prCookieMatcherStatusRate,
6020+ ("hostedMatchStatusRate" .=) <$>
6021+ _prHostedMatchStatusRate,
6022+ ("unsuccessfulRequestRate" .=) <$>
6023+ _prUnsuccessfulRequestRate,
6024+ ("bidRequestRate" .=) <$> _prBidRequestRate,
6025+ ("quotaThrottledLimit" .=) <$>
6026+ _prQuotaThrottledLimit,
6027+ ("quotaConfiguredLimit" .=) <$>
6028+ _prQuotaConfiguredLimit,
6029+ ("successfulRequestRate" .=) <$>
6030+ _prSuccessfulRequestRate,
6031+ ("latency85thPercentile" .=) <$>
6032+ _prLatency85thPercentile,
6033+ ("calloutStatusRate" .=) <$> _prCalloutStatusRate,
6034+ ("latency50thPercentile" .=) <$>
6035+ _prLatency50thPercentile,
6036+ ("bidRate" .=) <$> _prBidRate,
6037+ ("creativeStatusRate" .=) <$> _prCreativeStatusRate,
6038+ ("noQuotaInRegion" .=) <$> _prNoQuotaInRegion,
6039+ ("region" .=) <$> _prRegion,
6040+ ("inventoryMatchRate" .=) <$> _prInventoryMatchRate,
6041+ ("pixelMatchResponses" .=) <$>
6042+ _prPixelMatchResponses,
6043+ ("timestamp" .=) <$> _prTimestamp,
6044+ ("pixelMatchRequests" .=) <$> _prPixelMatchRequests,
6045+ ("outOfQuota" .=) <$> _prOutOfQuota])
6046+
45286047-- | The configuration data for an Ad Exchange performance report list.
45296048-- https:\/\/sites.google.com\/a\/google.com\/adx-integration\/Home\/engineering\/binary-releases\/rtb-api-release
45306049-- https:\/\/cs.corp.google.com\/#piper\/\/\/depot\/google3\/contentads\/adx\/tools\/rtb_api\/adxrtb.py
@@ -4562,6 +6081,22 @@ prlPerformanceReport
45626081 . _Default
45636082 . _Coerce
45646083
6084+instance FromJSON PerformanceReportList where
6085+ parseJSON
6086+ = withObject "PerformanceReportList"
6087+ (\ o ->
6088+ PerformanceReportList <$>
6089+ (o .:? "kind" .!=
6090+ "adexchangebuyer#performanceReportList")
6091+ <*> (o .:? "performanceReport" .!= mempty))
6092+
6093+instance ToJSON PerformanceReportList where
6094+ toJSON PerformanceReportList{..}
6095+ = object
6096+ (catMaybes
6097+ [Just ("kind" .= _prlKind),
6098+ ("performanceReport" .=) <$> _prlPerformanceReport])
6099+
45656100--
45666101-- /See:/ 'pretargetingConfig' smart constructor.
45676102data PretargetingConfig = PretargetingConfig
@@ -4846,6 +6381,70 @@ pcMobileOperatingSystemVersions
48466381 . _Default
48476382 . _Coerce
48486383
6384+instance FromJSON PretargetingConfig where
6385+ parseJSON
6386+ = withObject "PretargetingConfig"
6387+ (\ o ->
6388+ PretargetingConfig <$>
6389+ (o .:? "platforms" .!= mempty) <*>
6390+ (o .:? "mobileCarriers" .!= mempty)
6391+ <*> (o .:? "vendorTypes" .!= mempty)
6392+ <*> (o .:? "excludedGeoCriteriaIds" .!= mempty)
6393+ <*> (o .:? "supportedCreativeAttributes" .!= mempty)
6394+ <*> (o .:? "userLists" .!= mempty)
6395+ <*>
6396+ (o .:? "kind" .!=
6397+ "adexchangebuyer#pretargetingConfig")
6398+ <*> (o .:? "excludedPlacements" .!= mempty)
6399+ <*> (o .:? "mobileDevices" .!= mempty)
6400+ <*> (o .:? "languages" .!= mempty)
6401+ <*> (o .:? "verticals" .!= mempty)
6402+ <*> (o .:? "configId")
6403+ <*> (o .:? "placements" .!= mempty)
6404+ <*> (o .:? "excludedUserLists" .!= mempty)
6405+ <*> (o .:? "configName")
6406+ <*> (o .:? "geoCriteriaIds" .!= mempty)
6407+ <*> (o .:? "dimensions" .!= mempty)
6408+ <*> (o .:? "excludedVerticals" .!= mempty)
6409+ <*> (o .:? "creativeType" .!= mempty)
6410+ <*> (o .:? "isActive")
6411+ <*> (o .:? "excludedContentLabels" .!= mempty)
6412+ <*> (o .:? "billingId")
6413+ <*>
6414+ (o .:? "mobileOperatingSystemVersions" .!= mempty))
6415+
6416+instance ToJSON PretargetingConfig where
6417+ toJSON PretargetingConfig{..}
6418+ = object
6419+ (catMaybes
6420+ [("platforms" .=) <$> _pcPlatforms,
6421+ ("mobileCarriers" .=) <$> _pcMobileCarriers,
6422+ ("vendorTypes" .=) <$> _pcVendorTypes,
6423+ ("excludedGeoCriteriaIds" .=) <$>
6424+ _pcExcludedGeoCriteriaIds,
6425+ ("supportedCreativeAttributes" .=) <$>
6426+ _pcSupportedCreativeAttributes,
6427+ ("userLists" .=) <$> _pcUserLists,
6428+ Just ("kind" .= _pcKind),
6429+ ("excludedPlacements" .=) <$> _pcExcludedPlacements,
6430+ ("mobileDevices" .=) <$> _pcMobileDevices,
6431+ ("languages" .=) <$> _pcLanguages,
6432+ ("verticals" .=) <$> _pcVerticals,
6433+ ("configId" .=) <$> _pcConfigId,
6434+ ("placements" .=) <$> _pcPlacements,
6435+ ("excludedUserLists" .=) <$> _pcExcludedUserLists,
6436+ ("configName" .=) <$> _pcConfigName,
6437+ ("geoCriteriaIds" .=) <$> _pcGeoCriteriaIds,
6438+ ("dimensions" .=) <$> _pcDimensions,
6439+ ("excludedVerticals" .=) <$> _pcExcludedVerticals,
6440+ ("creativeType" .=) <$> _pcCreativeType,
6441+ ("isActive" .=) <$> _pcIsActive,
6442+ ("excludedContentLabels" .=) <$>
6443+ _pcExcludedContentLabels,
6444+ ("billingId" .=) <$> _pcBillingId,
6445+ ("mobileOperatingSystemVersions" .=) <$>
6446+ _pcMobileOperatingSystemVersions])
6447+
48496448--
48506449-- /See:/ 'pretargetingConfigItemDimensions' smart constructor.
48516450data PretargetingConfigItemDimensions = PretargetingConfigItemDimensions
@@ -4878,6 +6477,22 @@ pcidWidth :: Lens' PretargetingConfigItemDimensions (Maybe Int64)
48786477pcidWidth
48796478 = lens _pcidWidth (\ s a -> s{_pcidWidth = a})
48806479
6480+instance FromJSON PretargetingConfigItemDimensions
6481+ where
6482+ parseJSON
6483+ = withObject "PretargetingConfigItemDimensions"
6484+ (\ o ->
6485+ PretargetingConfigItemDimensions <$>
6486+ (o .:? "height") <*> (o .:? "width"))
6487+
6488+instance ToJSON PretargetingConfigItemDimensions
6489+ where
6490+ toJSON PretargetingConfigItemDimensions{..}
6491+ = object
6492+ (catMaybes
6493+ [("height" .=) <$> _pcidHeight,
6494+ ("width" .=) <$> _pcidWidth])
6495+
48816496--
48826497-- /See:/ 'pretargetingConfigItemExcludedPlacements' smart constructor.
48836498data PretargetingConfigItemExcludedPlacements = PretargetingConfigItemExcludedPlacements
@@ -4912,6 +6527,23 @@ pciepType :: Lens' PretargetingConfigItemExcludedPlacements (Maybe Text)
49126527pciepType
49136528 = lens _pciepType (\ s a -> s{_pciepType = a})
49146529
6530+instance FromJSON
6531+ PretargetingConfigItemExcludedPlacements where
6532+ parseJSON
6533+ = withObject
6534+ "PretargetingConfigItemExcludedPlacements"
6535+ (\ o ->
6536+ PretargetingConfigItemExcludedPlacements <$>
6537+ (o .:? "token") <*> (o .:? "type"))
6538+
6539+instance ToJSON
6540+ PretargetingConfigItemExcludedPlacements where
6541+ toJSON PretargetingConfigItemExcludedPlacements{..}
6542+ = object
6543+ (catMaybes
6544+ [("token" .=) <$> _pciepToken,
6545+ ("type" .=) <$> _pciepType])
6546+
49156547--
49166548-- /See:/ 'pretargetingConfigItemPlacements' smart constructor.
49176549data PretargetingConfigItemPlacements = PretargetingConfigItemPlacements
@@ -4945,6 +6577,22 @@ pcipToken
49456577pcipType :: Lens' PretargetingConfigItemPlacements (Maybe Text)
49466578pcipType = lens _pcipType (\ s a -> s{_pcipType = a})
49476579
6580+instance FromJSON PretargetingConfigItemPlacements
6581+ where
6582+ parseJSON
6583+ = withObject "PretargetingConfigItemPlacements"
6584+ (\ o ->
6585+ PretargetingConfigItemPlacements <$>
6586+ (o .:? "token") <*> (o .:? "type"))
6587+
6588+instance ToJSON PretargetingConfigItemPlacements
6589+ where
6590+ toJSON PretargetingConfigItemPlacements{..}
6591+ = object
6592+ (catMaybes
6593+ [("token" .=) <$> _pcipToken,
6594+ ("type" .=) <$> _pcipType])
6595+
49486596--
49496597-- /See:/ 'pretargetingConfigList' smart constructor.
49506598data PretargetingConfigList = PretargetingConfigList
@@ -4978,6 +6626,22 @@ pclItems
49786626 _Default
49796627 . _Coerce
49806628
6629+instance FromJSON PretargetingConfigList where
6630+ parseJSON
6631+ = withObject "PretargetingConfigList"
6632+ (\ o ->
6633+ PretargetingConfigList <$>
6634+ (o .:? "kind" .!=
6635+ "adexchangebuyer#pretargetingConfigList")
6636+ <*> (o .:? "items" .!= mempty))
6637+
6638+instance ToJSON PretargetingConfigList where
6639+ toJSON PretargetingConfigList{..}
6640+ = object
6641+ (catMaybes
6642+ [Just ("kind" .= _pclKind),
6643+ ("items" .=) <$> _pclItems])
6644+
49816645--
49826646-- /See:/ 'price' smart constructor.
49836647data Price = Price
@@ -5012,6 +6676,20 @@ pAmountMicros
50126676 = lens _pAmountMicros
50136677 (\ s a -> s{_pAmountMicros = a})
50146678
6679+instance FromJSON Price where
6680+ parseJSON
6681+ = withObject "Price"
6682+ (\ o ->
6683+ Price <$>
6684+ (o .:? "currencyCode") <*> (o .:? "amountMicros"))
6685+
6686+instance ToJSON Price where
6687+ toJSON Price{..}
6688+ = object
6689+ (catMaybes
6690+ [("currencyCode" .=) <$> _pCurrencyCode,
6691+ ("amountMicros" .=) <$> _pAmountMicros])
6692+
50156693-- | Used to specify pricing rules for buyers\/advertisers. Each
50166694-- PricePerBuyer in an offer can become [0,1] deals. To check if there is a
50176695-- PricePerBuyer for a particular buyer or buyer\/advertiser pair, we look
@@ -5051,6 +6729,20 @@ ppbPrice = lens _ppbPrice (\ s a -> s{_ppbPrice = a})
50516729ppbBuyer :: Lens' PricePerBuyer (Maybe (Maybe Buyer))
50526730ppbBuyer = lens _ppbBuyer (\ s a -> s{_ppbBuyer = a})
50536731
6732+instance FromJSON PricePerBuyer where
6733+ parseJSON
6734+ = withObject "PricePerBuyer"
6735+ (\ o ->
6736+ PricePerBuyer <$>
6737+ (o .:? "price") <*> (o .:? "buyer"))
6738+
6739+instance ToJSON PricePerBuyer where
6740+ toJSON PricePerBuyer{..}
6741+ = object
6742+ (catMaybes
6743+ [("price" .=) <$> _ppbPrice,
6744+ ("buyer" .=) <$> _ppbBuyer])
6745+
50546746--
50556747-- /See:/ 'privateData' smart constructor.
50566748data PrivateData = PrivateData
@@ -5083,6 +6775,20 @@ pdReferenceId
50836775 = lens _pdReferenceId
50846776 (\ s a -> s{_pdReferenceId = a})
50856777
6778+instance FromJSON PrivateData where
6779+ parseJSON
6780+ = withObject "PrivateData"
6781+ (\ o ->
6782+ PrivateData <$>
6783+ (o .:? "referencePayload") <*> (o .:? "referenceId"))
6784+
6785+instance ToJSON PrivateData where
6786+ toJSON PrivateData{..}
6787+ = object
6788+ (catMaybes
6789+ [("referencePayload" .=) <$> _pdReferencePayload,
6790+ ("referenceId" .=) <$> _pdReferenceId])
6791+
50866792--
50876793-- /See:/ 'ruleKeyValuePair' smart constructor.
50886794data RuleKeyValuePair = RuleKeyValuePair
@@ -5113,6 +6819,20 @@ rkvpValue :: Lens' RuleKeyValuePair (Maybe Text)
51136819rkvpValue
51146820 = lens _rkvpValue (\ s a -> s{_rkvpValue = a})
51156821
6822+instance FromJSON RuleKeyValuePair where
6823+ parseJSON
6824+ = withObject "RuleKeyValuePair"
6825+ (\ o ->
6826+ RuleKeyValuePair <$>
6827+ (o .:? "keyName") <*> (o .:? "value"))
6828+
6829+instance ToJSON RuleKeyValuePair where
6830+ toJSON RuleKeyValuePair{..}
6831+ = object
6832+ (catMaybes
6833+ [("keyName" .=) <$> _rkvpKeyName,
6834+ ("value" .=) <$> _rkvpValue])
6835+
51166836--
51176837-- /See:/ 'seller' smart constructor.
51186838data Seller = Seller
@@ -5147,6 +6867,20 @@ sSubAccountId
51476867 = lens _sSubAccountId
51486868 (\ s a -> s{_sSubAccountId = a})
51496869
6870+instance FromJSON Seller where
6871+ parseJSON
6872+ = withObject "Seller"
6873+ (\ o ->
6874+ Seller <$>
6875+ (o .:? "accountId") <*> (o .:? "subAccountId"))
6876+
6877+instance ToJSON Seller where
6878+ toJSON Seller{..}
6879+ = object
6880+ (catMaybes
6881+ [("accountId" .=) <$> _sAccountId,
6882+ ("subAccountId" .=) <$> _sSubAccountId])
6883+
51506884--
51516885-- /See:/ 'sharedTargeting' smart constructor.
51526886data SharedTargeting = SharedTargeting
@@ -5191,6 +6925,22 @@ stInclusions
51916925 . _Default
51926926 . _Coerce
51936927
6928+instance FromJSON SharedTargeting where
6929+ parseJSON
6930+ = withObject "SharedTargeting"
6931+ (\ o ->
6932+ SharedTargeting <$>
6933+ (o .:? "key") <*> (o .:? "exclusions" .!= mempty) <*>
6934+ (o .:? "inclusions" .!= mempty))
6935+
6936+instance ToJSON SharedTargeting where
6937+ toJSON SharedTargeting{..}
6938+ = object
6939+ (catMaybes
6940+ [("key" .=) <$> _stKey,
6941+ ("exclusions" .=) <$> _stExclusions,
6942+ ("inclusions" .=) <$> _stInclusions])
6943+
51946944--
51956945-- /See:/ 'statsDto' smart constructor.
51966946data StatsDto = StatsDto
@@ -5252,6 +7002,27 @@ sdRequests :: Lens' StatsDto (Maybe Int64)
52527002sdRequests
52537003 = lens _sdRequests (\ s a -> s{_sdRequests = a})
52547004
7005+instance FromJSON StatsDto where
7006+ parseJSON
7007+ = withObject "StatsDto"
7008+ (\ o ->
7009+ StatsDto <$>
7010+ (o .:? "bids") <*> (o .:? "spend") <*>
7011+ (o .:? "impressions")
7012+ <*> (o .:? "goodBids")
7013+ <*> (o .:? "revenue")
7014+ <*> (o .:? "requests"))
7015+
7016+instance ToJSON StatsDto where
7017+ toJSON StatsDto{..}
7018+ = object
7019+ (catMaybes
7020+ [("bids" .=) <$> _sdBids, ("spend" .=) <$> _sdSpend,
7021+ ("impressions" .=) <$> _sdImpressions,
7022+ ("goodBids" .=) <$> _sdGoodBids,
7023+ ("revenue" .=) <$> _sdRevenue,
7024+ ("requests" .=) <$> _sdRequests])
7025+
52557026--
52567027-- /See:/ 'targetingValue' smart constructor.
52577028data TargetingValue = TargetingValue
@@ -5306,6 +7077,25 @@ tvDayPartTargetingValue
53067077 = lens _tvDayPartTargetingValue
53077078 (\ s a -> s{_tvDayPartTargetingValue = a})
53087079
7080+instance FromJSON TargetingValue where
7081+ parseJSON
7082+ = withObject "TargetingValue"
7083+ (\ o ->
7084+ TargetingValue <$>
7085+ (o .:? "creativeSizeValue") <*> (o .:? "stringValue")
7086+ <*> (o .:? "longValue")
7087+ <*> (o .:? "dayPartTargetingValue"))
7088+
7089+instance ToJSON TargetingValue where
7090+ toJSON TargetingValue{..}
7091+ = object
7092+ (catMaybes
7093+ [("creativeSizeValue" .=) <$> _tvCreativeSizeValue,
7094+ ("stringValue" .=) <$> _tvStringValue,
7095+ ("longValue" .=) <$> _tvLongValue,
7096+ ("dayPartTargetingValue" .=) <$>
7097+ _tvDayPartTargetingValue])
7098+
53097099--
53107100-- /See:/ 'targetingValueCreativeSize' smart constructor.
53117101data TargetingValueCreativeSize = TargetingValueCreativeSize
@@ -5350,6 +7140,23 @@ tvcsCreativeSizeType
53507140 = lens _tvcsCreativeSizeType
53517141 (\ s a -> s{_tvcsCreativeSizeType = a})
53527142
7143+instance FromJSON TargetingValueCreativeSize where
7144+ parseJSON
7145+ = withObject "TargetingValueCreativeSize"
7146+ (\ o ->
7147+ TargetingValueCreativeSize <$>
7148+ (o .:? "size") <*>
7149+ (o .:? "companionSizes" .!= mempty)
7150+ <*> (o .:? "creativeSizeType"))
7151+
7152+instance ToJSON TargetingValueCreativeSize where
7153+ toJSON TargetingValueCreativeSize{..}
7154+ = object
7155+ (catMaybes
7156+ [("size" .=) <$> _tvcsSize,
7157+ ("companionSizes" .=) <$> _tvcsCompanionSizes,
7158+ ("creativeSizeType" .=) <$> _tvcsCreativeSizeType])
7159+
53537160--
53547161-- /See:/ 'targetingValueDayPartTargeting' smart constructor.
53557162data TargetingValueDayPartTargeting = TargetingValueDayPartTargeting
@@ -5384,6 +7191,22 @@ tvdptDayParts
53847191 . _Default
53857192 . _Coerce
53867193
7194+instance FromJSON TargetingValueDayPartTargeting
7195+ where
7196+ parseJSON
7197+ = withObject "TargetingValueDayPartTargeting"
7198+ (\ o ->
7199+ TargetingValueDayPartTargeting <$>
7200+ (o .:? "timeZoneType") <*>
7201+ (o .:? "dayParts" .!= mempty))
7202+
7203+instance ToJSON TargetingValueDayPartTargeting where
7204+ toJSON TargetingValueDayPartTargeting{..}
7205+ = object
7206+ (catMaybes
7207+ [("timeZoneType" .=) <$> _tvdptTimeZoneType,
7208+ ("dayParts" .=) <$> _tvdptDayParts])
7209+
53877210--
53887211-- /See:/ 'targetingValueDayPartTargetingDayPart' smart constructor.
53897212data TargetingValueDayPartTargetingDayPart = TargetingValueDayPartTargetingDayPart
@@ -5443,6 +7266,28 @@ tvdptdpEndMinute
54437266 = lens _tvdptdpEndMinute
54447267 (\ s a -> s{_tvdptdpEndMinute = a})
54457268
7269+instance FromJSON
7270+ TargetingValueDayPartTargetingDayPart where
7271+ parseJSON
7272+ = withObject "TargetingValueDayPartTargetingDayPart"
7273+ (\ o ->
7274+ TargetingValueDayPartTargetingDayPart <$>
7275+ (o .:? "endHour") <*> (o .:? "startHour") <*>
7276+ (o .:? "startMinute")
7277+ <*> (o .:? "dayOfWeek")
7278+ <*> (o .:? "endMinute"))
7279+
7280+instance ToJSON TargetingValueDayPartTargetingDayPart
7281+ where
7282+ toJSON TargetingValueDayPartTargetingDayPart{..}
7283+ = object
7284+ (catMaybes
7285+ [("endHour" .=) <$> _tvdptdpEndHour,
7286+ ("startHour" .=) <$> _tvdptdpStartHour,
7287+ ("startMinute" .=) <$> _tvdptdpStartMinute,
7288+ ("dayOfWeek" .=) <$> _tvdptdpDayOfWeek,
7289+ ("endMinute" .=) <$> _tvdptdpEndMinute])
7290+
54467291--
54477292-- /See:/ 'targetingValueSize' smart constructor.
54487293data TargetingValueSize = TargetingValueSize
@@ -5474,6 +7319,20 @@ tvsHeight
54747319tvsWidth :: Lens' TargetingValueSize (Maybe Int32)
54757320tvsWidth = lens _tvsWidth (\ s a -> s{_tvsWidth = a})
54767321
7322+instance FromJSON TargetingValueSize where
7323+ parseJSON
7324+ = withObject "TargetingValueSize"
7325+ (\ o ->
7326+ TargetingValueSize <$>
7327+ (o .:? "height") <*> (o .:? "width"))
7328+
7329+instance ToJSON TargetingValueSize where
7330+ toJSON TargetingValueSize{..}
7331+ = object
7332+ (catMaybes
7333+ [("height" .=) <$> _tvsHeight,
7334+ ("width" .=) <$> _tvsWidth])
7335+
54777336--
54787337-- /See:/ 'termsDto' smart constructor.
54797338data TermsDto = TermsDto
@@ -5759,6 +7618,77 @@ tdDescription
57597618 = lens _tdDescription
57607619 (\ s a -> s{_tdDescription = a})
57617620
7621+instance FromJSON TermsDto where
7622+ parseJSON
7623+ = withObject "TermsDto"
7624+ (\ o ->
7625+ TermsDto <$>
7626+ (o .:? "finalizeAutomatically") <*>
7627+ (o .:? "buyerBillingType")
7628+ <*> (o .:? "targetingAllAdSlots")
7629+ <*> (o .:? "urls" .!= mempty)
7630+ <*> (o .:? "endDate")
7631+ <*> (o .:? "cpm")
7632+ <*> (o .:? "estimatedSpend")
7633+ <*> (o .:? "advertisers" .!= mempty)
7634+ <*> (o .:? "estimatedImpressionsPerDay")
7635+ <*> (o .:? "monetizerType")
7636+ <*> (o .:? "audienceSegmentDescription")
7637+ <*> (o .:? "creativeReviewPolicy")
7638+ <*> (o .:? "minimumTrueLooks")
7639+ <*> (o .:? "startDate")
7640+ <*> (o .:? "creativeBlockingLevel")
7641+ <*> (o .:? "semiTransparent")
7642+ <*> (o .:? "audienceSegment")
7643+ <*> (o .:? "dealPremium")
7644+ <*> (o .:? "isReservation")
7645+ <*> (o .:? "adSlots" .!= mempty)
7646+ <*> (o .:? "termsAttributes" .!= mempty)
7647+ <*> (o .:? "inventorySegmentTargeting")
7648+ <*> (o .:? "descriptiveName")
7649+ <*> (o .:? "minimumSpendMicros")
7650+ <*> (o .:? "targetByDealId")
7651+ <*> (o .:? "billingTerms")
7652+ <*> (o .:? "description"))
7653+
7654+instance ToJSON TermsDto where
7655+ toJSON TermsDto{..}
7656+ = object
7657+ (catMaybes
7658+ [("finalizeAutomatically" .=) <$>
7659+ _tdFinalizeAutomatically,
7660+ ("buyerBillingType" .=) <$> _tdBuyerBillingType,
7661+ ("targetingAllAdSlots" .=) <$>
7662+ _tdTargetingAllAdSlots,
7663+ ("urls" .=) <$> _tdUrls,
7664+ ("endDate" .=) <$> _tdEndDate, ("cpm" .=) <$> _tdCpm,
7665+ ("estimatedSpend" .=) <$> _tdEstimatedSpend,
7666+ ("advertisers" .=) <$> _tdAdvertisers,
7667+ ("estimatedImpressionsPerDay" .=) <$>
7668+ _tdEstimatedImpressionsPerDay,
7669+ ("monetizerType" .=) <$> _tdMonetizerType,
7670+ ("audienceSegmentDescription" .=) <$>
7671+ _tdAudienceSegmentDescription,
7672+ ("creativeReviewPolicy" .=) <$>
7673+ _tdCreativeReviewPolicy,
7674+ ("minimumTrueLooks" .=) <$> _tdMinimumTrueLooks,
7675+ ("startDate" .=) <$> _tdStartDate,
7676+ ("creativeBlockingLevel" .=) <$>
7677+ _tdCreativeBlockingLevel,
7678+ ("semiTransparent" .=) <$> _tdSemiTransparent,
7679+ ("audienceSegment" .=) <$> _tdAudienceSegment,
7680+ ("dealPremium" .=) <$> _tdDealPremium,
7681+ ("isReservation" .=) <$> _tdIsReservation,
7682+ ("adSlots" .=) <$> _tdAdSlots,
7683+ ("termsAttributes" .=) <$> _tdTermsAttributes,
7684+ ("inventorySegmentTargeting" .=) <$>
7685+ _tdInventorySegmentTargeting,
7686+ ("descriptiveName" .=) <$> _tdDescriptiveName,
7687+ ("minimumSpendMicros" .=) <$> _tdMinimumSpendMicros,
7688+ ("targetByDealId" .=) <$> _tdTargetByDealId,
7689+ ("billingTerms" .=) <$> _tdBillingTerms,
7690+ ("description" .=) <$> _tdDescription])
7691+
57627692--
57637693-- /See:/ 'webPropertyDto' smart constructor.
57647694data WebPropertyDto = WebPropertyDto
@@ -5832,3 +7762,30 @@ wpdAllowInterestTargetedAds :: Lens' WebPropertyDto (Maybe Bool)
58327762wpdAllowInterestTargetedAds
58337763 = lens _wpdAllowInterestTargetedAds
58347764 (\ s a -> s{_wpdAllowInterestTargetedAds = a})
7765+
7766+instance FromJSON WebPropertyDto where
7767+ parseJSON
7768+ = withObject "WebPropertyDto"
7769+ (\ o ->
7770+ WebPropertyDto <$>
7771+ (o .:? "enabledForPreferredDeals") <*>
7772+ (o .:? "syndicationProduct")
7773+ <*> (o .:? "name")
7774+ <*> (o .:? "propertyCode")
7775+ <*> (o .:? "id")
7776+ <*> (o .:? "siteUrls" .!= mempty)
7777+ <*> (o .:? "allowInterestTargetedAds"))
7778+
7779+instance ToJSON WebPropertyDto where
7780+ toJSON WebPropertyDto{..}
7781+ = object
7782+ (catMaybes
7783+ [("enabledForPreferredDeals" .=) <$>
7784+ _wpdEnabledForPreferredDeals,
7785+ ("syndicationProduct" .=) <$> _wpdSyndicationProduct,
7786+ ("name" .=) <$> _wpdName,
7787+ ("propertyCode" .=) <$> _wpdPropertyCode,
7788+ ("id" .=) <$> _wpdId,
7789+ ("siteUrls" .=) <$> _wpdSiteUrls,
7790+ ("allowInterestTargetedAds" .=) <$>
7791+ _wpdAllowInterestTargetedAds])
gogol-adexchange-seller/gen/Network/Google/AdExchange/Seller.hs+160−134
@@ -221,18 +221,20 @@ type AdclientsAPI = AdclientsList
221221
222222-- | List all ad clients in this Ad Exchange account.
223223type AdclientsList =
224− "adexchangeseller" :> "v2.0" :> "accounts" :>
225− Capture "accountId" Text
226− :> "adclients"
227− :> QueryParam "quotaUser" Text
228− :> QueryParam "prettyPrint" Bool
229− :> QueryParam "userIp" Text
230− :> QueryParam "key" Text
231− :> QueryParam "pageToken" Text
232− :> QueryParam "oauth_token" Text
233− :> QueryParam "maxResults" Word32
234− :> QueryParam "fields" Text
235− :> QueryParam "alt" Text
224+ "adexchangeseller" :>
225+ "v2.0" :>
226+ "accounts" :>
227+ Capture "accountId" Text :>
228+ "adclients" :>
229+ QueryParam "quotaUser" Text :>
230+ QueryParam "prettyPrint" Bool :>
231+ QueryParam "userIp" Text :>
232+ QueryParam "key" Text :>
233+ QueryParam "pageToken" Text :>
234+ QueryParam "oauth_token" Text :>
235+ QueryParam "maxResults" Word32 :>
236+ QueryParam "fields" Text :>
237+ QueryParam "alt" Text :> Get '[JSON] AdClients
236238
237239type ReportsAPI = SavedAPI
238240
@@ -240,73 +242,83 @@ type SavedAPI = SavedList :<|> SavedGenerate
240242
241243-- | List all saved reports in this Ad Exchange account.
242244type SavedList =
243− "adexchangeseller" :> "v2.0" :> "accounts" :>
244− Capture "accountId" Text
245− :> "reports"
246− :> "saved"
247− :> QueryParam "quotaUser" Text
248− :> QueryParam "prettyPrint" Bool
249− :> QueryParam "userIp" Text
250− :> QueryParam "key" Text
251− :> QueryParam "pageToken" Text
252− :> QueryParam "oauth_token" Text
253− :> QueryParam "maxResults" Int32
254− :> QueryParam "fields" Text
255− :> QueryParam "alt" Text
245+ "adexchangeseller" :>
246+ "v2.0" :>
247+ "accounts" :>
248+ Capture "accountId" Text :>
249+ "reports" :>
250+ "saved" :>
251+ QueryParam "quotaUser" Text :>
252+ QueryParam "prettyPrint" Bool :>
253+ QueryParam "userIp" Text :>
254+ QueryParam "key" Text :>
255+ QueryParam "pageToken" Text :>
256+ QueryParam "oauth_token" Text :>
257+ QueryParam "maxResults" Int32 :>
258+ QueryParam "fields" Text :>
259+ QueryParam "alt" Text :>
260+ Get '[JSON] SavedReports
256261
257262-- | Generate an Ad Exchange report based on the saved report ID sent in the
258263-- query parameters.
259264type SavedGenerate =
260− "adexchangeseller" :> "v2.0" :> "accounts" :>
261− Capture "accountId" Text
262− :> "reports"
263− :> Capture "savedReportId" Text
264− :> QueryParam "quotaUser" Text
265− :> QueryParam "prettyPrint" Bool
266− :> QueryParam "userIp" Text
267− :> QueryParam "locale" Text
268− :> QueryParam "key" Text
269− :> QueryParam "oauth_token" Text
270− :> QueryParam "startIndex" Int32
271− :> QueryParam "maxResults" Int32
272− :> QueryParam "fields" Text
273− :> QueryParam "alt" Text
265+ "adexchangeseller" :>
266+ "v2.0" :>
267+ "accounts" :>
268+ Capture "accountId" Text :>
269+ "reports" :>
270+ Capture "savedReportId" Text :>
271+ QueryParam "quotaUser" Text :>
272+ QueryParam "prettyPrint" Bool :>
273+ QueryParam "userIp" Text :>
274+ QueryParam "locale" Text :>
275+ QueryParam "key" Text :>
276+ QueryParam "oauth_token" Text :>
277+ QueryParam "startIndex" Int32 :>
278+ QueryParam "maxResults" Int32 :>
279+ QueryParam "fields" Text :>
280+ QueryParam "alt" Text :> Get '[JSON] Report
274281
275282type AlertsAPI = AlertsList
276283
277284-- | List the alerts for this Ad Exchange account.
278285type AlertsList =
279− "adexchangeseller" :> "v2.0" :> "accounts" :>
280− Capture "accountId" Text
281− :> "alerts"
282− :> QueryParam "quotaUser" Text
283− :> QueryParam "prettyPrint" Bool
284− :> QueryParam "userIp" Text
285− :> QueryParam "locale" Text
286− :> QueryParam "key" Text
287− :> QueryParam "oauth_token" Text
288− :> QueryParam "fields" Text
289− :> QueryParam "alt" Text
286+ "adexchangeseller" :>
287+ "v2.0" :>
288+ "accounts" :>
289+ Capture "accountId" Text :>
290+ "alerts" :>
291+ QueryParam "quotaUser" Text :>
292+ QueryParam "prettyPrint" Bool :>
293+ QueryParam "userIp" Text :>
294+ QueryParam "locale" Text :>
295+ QueryParam "key" Text :>
296+ QueryParam "oauth_token" Text :>
297+ QueryParam "fields" Text :>
298+ QueryParam "alt" Text :> Get '[JSON] Alerts
290299
291300type UrlchannelsAPI = UrlchannelsList
292301
293302-- | List all URL channels in the specified ad client for this Ad Exchange
294303-- account.
295304type UrlchannelsList =
296− "adexchangeseller" :> "v2.0" :> "accounts" :>
297− Capture "accountId" Text
298− :> "adclients"
299− :> Capture "adClientId" Text
300− :> "urlchannels"
301− :> QueryParam "quotaUser" Text
302− :> QueryParam "prettyPrint" Bool
303− :> QueryParam "userIp" Text
304− :> QueryParam "key" Text
305− :> QueryParam "pageToken" Text
306− :> QueryParam "oauth_token" Text
307− :> QueryParam "maxResults" Word32
308− :> QueryParam "fields" Text
309− :> QueryParam "alt" Text
305+ "adexchangeseller" :>
306+ "v2.0" :>
307+ "accounts" :>
308+ Capture "accountId" Text :>
309+ "adclients" :>
310+ Capture "adClientId" Text :>
311+ "urlchannels" :>
312+ QueryParam "quotaUser" Text :>
313+ QueryParam "prettyPrint" Bool :>
314+ QueryParam "userIp" Text :>
315+ QueryParam "key" Text :>
316+ QueryParam "pageToken" Text :>
317+ QueryParam "oauth_token" Text :>
318+ QueryParam "maxResults" Word32 :>
319+ QueryParam "fields" Text :>
320+ QueryParam "alt" Text :>
321+ Get '[JSON] UrlChannels
310322
311323type CustomchannelsAPI =
312324 CustomchannelsList :<|> CustomchannelsGet
@@ -314,66 +326,76 @@ type CustomchannelsAPI =
314326-- | List all custom channels in the specified ad client for this Ad Exchange
315327-- account.
316328type CustomchannelsList =
317− "adexchangeseller" :> "v2.0" :> "accounts" :>
318− Capture "accountId" Text
319− :> "adclients"
320− :> Capture "adClientId" Text
321− :> "customchannels"
322− :> QueryParam "quotaUser" Text
323− :> QueryParam "prettyPrint" Bool
324− :> QueryParam "userIp" Text
325− :> QueryParam "key" Text
326− :> QueryParam "pageToken" Text
327− :> QueryParam "oauth_token" Text
328− :> QueryParam "maxResults" Word32
329− :> QueryParam "fields" Text
330− :> QueryParam "alt" Text
329+ "adexchangeseller" :>
330+ "v2.0" :>
331+ "accounts" :>
332+ Capture "accountId" Text :>
333+ "adclients" :>
334+ Capture "adClientId" Text :>
335+ "customchannels" :>
336+ QueryParam "quotaUser" Text :>
337+ QueryParam "prettyPrint" Bool :>
338+ QueryParam "userIp" Text :>
339+ QueryParam "key" Text :>
340+ QueryParam "pageToken" Text :>
341+ QueryParam "oauth_token" Text :>
342+ QueryParam "maxResults" Word32 :>
343+ QueryParam "fields" Text :>
344+ QueryParam "alt" Text :>
345+ Get '[JSON] CustomChannels
331346
332347-- | Get the specified custom channel from the specified ad client.
333348type CustomchannelsGet =
334− "adexchangeseller" :> "v2.0" :> "accounts" :>
335− Capture "accountId" Text
336− :> "adclients"
337− :> Capture "adClientId" Text
338− :> "customchannels"
339− :> Capture "customChannelId" Text
340− :> QueryParam "quotaUser" Text
341− :> QueryParam "prettyPrint" Bool
342− :> QueryParam "userIp" Text
343− :> QueryParam "key" Text
344− :> QueryParam "oauth_token" Text
345− :> QueryParam "fields" Text
346− :> QueryParam "alt" Text
349+ "adexchangeseller" :>
350+ "v2.0" :>
351+ "accounts" :>
352+ Capture "accountId" Text :>
353+ "adclients" :>
354+ Capture "adClientId" Text :>
355+ "customchannels" :>
356+ Capture "customChannelId" Text :>
357+ QueryParam "quotaUser" Text :>
358+ QueryParam "prettyPrint" Bool :>
359+ QueryParam "userIp" Text :>
360+ QueryParam "key" Text :>
361+ QueryParam "oauth_token" Text :>
362+ QueryParam "fields" Text :>
363+ QueryParam "alt" Text :>
364+ Get '[JSON] CustomChannel
347365
348366type PreferreddealsAPI =
349367 PreferreddealsList :<|> PreferreddealsGet
350368
351369-- | List the preferred deals for this Ad Exchange account.
352370type PreferreddealsList =
353− "adexchangeseller" :> "v2.0" :> "accounts" :>
354− Capture "accountId" Text
355− :> "preferreddeals"
356− :> QueryParam "quotaUser" Text
357− :> QueryParam "prettyPrint" Bool
358− :> QueryParam "userIp" Text
359− :> QueryParam "key" Text
360− :> QueryParam "oauth_token" Text
361− :> QueryParam "fields" Text
362− :> QueryParam "alt" Text
371+ "adexchangeseller" :>
372+ "v2.0" :>
373+ "accounts" :>
374+ Capture "accountId" Text :>
375+ "preferreddeals" :>
376+ QueryParam "quotaUser" Text :>
377+ QueryParam "prettyPrint" Bool :>
378+ QueryParam "userIp" Text :>
379+ QueryParam "key" Text :>
380+ QueryParam "oauth_token" Text :>
381+ QueryParam "fields" Text :>
382+ QueryParam "alt" Text :> Get '[JSON] PreferredDeals
363383
364384-- | Get information about the selected Ad Exchange Preferred Deal.
365385type PreferreddealsGet =
366− "adexchangeseller" :> "v2.0" :> "accounts" :>
367− Capture "accountId" Text
368− :> "preferreddeals"
369− :> Capture "dealId" Text
370− :> QueryParam "quotaUser" Text
371− :> QueryParam "prettyPrint" Bool
372− :> QueryParam "userIp" Text
373− :> QueryParam "key" Text
374− :> QueryParam "oauth_token" Text
375− :> QueryParam "fields" Text
376− :> QueryParam "alt" Text
386+ "adexchangeseller" :>
387+ "v2.0" :>
388+ "accounts" :>
389+ Capture "accountId" Text :>
390+ "preferreddeals" :>
391+ Capture "dealId" Text :>
392+ QueryParam "quotaUser" Text :>
393+ QueryParam "prettyPrint" Bool :>
394+ QueryParam "userIp" Text :>
395+ QueryParam "key" Text :>
396+ QueryParam "oauth_token" Text :>
397+ QueryParam "fields" Text :>
398+ QueryParam "alt" Text :> Get '[JSON] PreferredDeal
377399
378400type MetadataAPI = MetricsAPI :<|> DimensionsAPI
379401
@@ -381,31 +403,35 @@ type MetricsAPI = MetricsList
381403
382404-- | List the metadata for the metrics available to this AdExchange account.
383405type MetricsList =
384− "adexchangeseller" :> "v2.0" :> "accounts" :>
385− Capture "accountId" Text
386− :> "metadata"
387− :> "metrics"
388− :> QueryParam "quotaUser" Text
389− :> QueryParam "prettyPrint" Bool
390− :> QueryParam "userIp" Text
391− :> QueryParam "key" Text
392− :> QueryParam "oauth_token" Text
393− :> QueryParam "fields" Text
394− :> QueryParam "alt" Text
406+ "adexchangeseller" :>
407+ "v2.0" :>
408+ "accounts" :>
409+ Capture "accountId" Text :>
410+ "metadata" :>
411+ "metrics" :>
412+ QueryParam "quotaUser" Text :>
413+ QueryParam "prettyPrint" Bool :>
414+ QueryParam "userIp" Text :>
415+ QueryParam "key" Text :>
416+ QueryParam "oauth_token" Text :>
417+ QueryParam "fields" Text :>
418+ QueryParam "alt" Text :> Get '[JSON] Metadata
395419
396420type DimensionsAPI = DimensionsList
397421
398422-- | List the metadata for the dimensions available to this AdExchange
399423-- account.
400424type DimensionsList =
401− "adexchangeseller" :> "v2.0" :> "accounts" :>
402− Capture "accountId" Text
403− :> "metadata"
404− :> "dimensions"
405− :> QueryParam "quotaUser" Text
406− :> QueryParam "prettyPrint" Bool
407− :> QueryParam "userIp" Text
408− :> QueryParam "key" Text
409− :> QueryParam "oauth_token" Text
410− :> QueryParam "fields" Text
411− :> QueryParam "alt" Text
425+ "adexchangeseller" :>
426+ "v2.0" :>
427+ "accounts" :>
428+ Capture "accountId" Text :>
429+ "metadata" :>
430+ "dimensions" :>
431+ QueryParam "quotaUser" Text :>
432+ QueryParam "prettyPrint" Bool :>
433+ QueryParam "userIp" Text :>
434+ QueryParam "key" Text :>
435+ QueryParam "oauth_token" Text :>
436+ QueryParam "fields" Text :>
437+ QueryParam "alt" Text :> Get '[JSON] Metadata
gogol-adexchange-seller/gen/Network/Google/AdExchange/Seller/Types/Product.hs+350
@@ -1,6 +1,7 @@
11{-# LANGUAGE DeriveDataTypeable #-}
22{-# LANGUAGE DeriveGeneric #-}
33{-# LANGUAGE OverloadedStrings #-}
4+{-# LANGUAGE RecordWildCards #-}
45
56{-# OPTIONS_GHC -fno-warn-unused-imports #-}
67
@@ -55,6 +56,22 @@ accName = lens _accName (\ s a -> s{_accName = a})
5556accId :: Lens' Account (Maybe Text)
5657accId = lens _accId (\ s a -> s{_accId = a})
5758
59+instance FromJSON Account where
60+ parseJSON
61+ = withObject "Account"
62+ (\ o ->
63+ Account <$>
64+ (o .:? "kind" .!= "adexchangeseller#account") <*>
65+ (o .:? "name")
66+ <*> (o .:? "id"))
67+
68+instance ToJSON Account where
69+ toJSON Account{..}
70+ = object
71+ (catMaybes
72+ [Just ("kind" .= _accKind), ("name" .=) <$> _accName,
73+ ("id" .=) <$> _accId])
74+
5875--
5976-- /See:/ 'accounts' smart constructor.
6077data Accounts = Accounts
@@ -106,6 +123,23 @@ aItems
106123 = lens _aItems (\ s a -> s{_aItems = a}) . _Default .
107124 _Coerce
108125
126+instance FromJSON Accounts where
127+ parseJSON
128+ = withObject "Accounts"
129+ (\ o ->
130+ Accounts <$>
131+ (o .:? "etag") <*> (o .:? "nextPageToken") <*>
132+ (o .:? "kind" .!= "adexchangeseller#accounts")
133+ <*> (o .:? "items" .!= mempty))
134+
135+instance ToJSON Accounts where
136+ toJSON Accounts{..}
137+ = object
138+ (catMaybes
139+ [("etag" .=) <$> _aEtag,
140+ ("nextPageToken" .=) <$> _aNextPageToken,
141+ Just ("kind" .= _aKind), ("items" .=) <$> _aItems])
142+
109143--
110144-- /See:/ 'adClient' smart constructor.
111145data AdClient = AdClient
@@ -166,6 +200,27 @@ acProductCode
166200 = lens _acProductCode
167201 (\ s a -> s{_acProductCode = a})
168202
203+instance FromJSON AdClient where
204+ parseJSON
205+ = withObject "AdClient"
206+ (\ o ->
207+ AdClient <$>
208+ (o .:? "kind" .!= "adexchangeseller#adClient") <*>
209+ (o .:? "arcOptIn")
210+ <*> (o .:? "supportsReporting")
211+ <*> (o .:? "id")
212+ <*> (o .:? "productCode"))
213+
214+instance ToJSON AdClient where
215+ toJSON AdClient{..}
216+ = object
217+ (catMaybes
218+ [Just ("kind" .= _acKind),
219+ ("arcOptIn" .=) <$> _acArcOptIn,
220+ ("supportsReporting" .=) <$> _acSupportsReporting,
221+ ("id" .=) <$> _acId,
222+ ("productCode" .=) <$> _acProductCode])
223+
169224--
170225-- /See:/ 'adClients' smart constructor.
171226data AdClients = AdClients
@@ -218,6 +273,24 @@ acsItems
218273 _Default
219274 . _Coerce
220275
276+instance FromJSON AdClients where
277+ parseJSON
278+ = withObject "AdClients"
279+ (\ o ->
280+ AdClients <$>
281+ (o .:? "etag") <*> (o .:? "nextPageToken") <*>
282+ (o .:? "kind" .!= "adexchangeseller#adClients")
283+ <*> (o .:? "items" .!= mempty))
284+
285+instance ToJSON AdClients where
286+ toJSON AdClients{..}
287+ = object
288+ (catMaybes
289+ [("etag" .=) <$> _acsEtag,
290+ ("nextPageToken" .=) <$> _acsNextPageToken,
291+ Just ("kind" .= _acsKind),
292+ ("items" .=) <$> _acsItems])
293+
221294--
222295-- /See:/ 'alert' smart constructor.
223296data Alert = Alert
@@ -277,6 +350,26 @@ aleMessage :: Lens' Alert (Maybe Text)
277350aleMessage
278351 = lens _aleMessage (\ s a -> s{_aleMessage = a})
279352
353+instance FromJSON Alert where
354+ parseJSON
355+ = withObject "Alert"
356+ (\ o ->
357+ Alert <$>
358+ (o .:? "kind" .!= "adexchangeseller#alert") <*>
359+ (o .:? "severity")
360+ <*> (o .:? "id")
361+ <*> (o .:? "type")
362+ <*> (o .:? "message"))
363+
364+instance ToJSON Alert where
365+ toJSON Alert{..}
366+ = object
367+ (catMaybes
368+ [Just ("kind" .= _aleKind),
369+ ("severity" .=) <$> _aleSeverity,
370+ ("id" .=) <$> _aleId, ("type" .=) <$> _aleType,
371+ ("message" .=) <$> _aleMessage])
372+
280373--
281374-- /See:/ 'alerts' smart constructor.
282375data Alerts = Alerts
@@ -309,6 +402,21 @@ aaItems
309402 = lens _aaItems (\ s a -> s{_aaItems = a}) . _Default
310403 . _Coerce
311404
405+instance FromJSON Alerts where
406+ parseJSON
407+ = withObject "Alerts"
408+ (\ o ->
409+ Alerts <$>
410+ (o .:? "kind" .!= "adexchangeseller#alerts") <*>
411+ (o .:? "items" .!= mempty))
412+
413+instance ToJSON Alerts where
414+ toJSON Alerts{..}
415+ = object
416+ (catMaybes
417+ [Just ("kind" .= _aaKind),
418+ ("items" .=) <$> _aaItems])
419+
312420--
313421-- /See:/ 'customChannel' smart constructor.
314422data CustomChannel = CustomChannel
@@ -367,6 +475,25 @@ ccCode = lens _ccCode (\ s a -> s{_ccCode = a})
367475ccId :: Lens' CustomChannel (Maybe Text)
368476ccId = lens _ccId (\ s a -> s{_ccId = a})
369477
478+instance FromJSON CustomChannel where
479+ parseJSON
480+ = withObject "CustomChannel"
481+ (\ o ->
482+ CustomChannel <$>
483+ (o .:? "targetingInfo") <*>
484+ (o .:? "kind" .!= "adexchangeseller#customChannel")
485+ <*> (o .:? "name")
486+ <*> (o .:? "code")
487+ <*> (o .:? "id"))
488+
489+instance ToJSON CustomChannel where
490+ toJSON CustomChannel{..}
491+ = object
492+ (catMaybes
493+ [("targetingInfo" .=) <$> _ccTargetingInfo,
494+ Just ("kind" .= _ccKind), ("name" .=) <$> _ccName,
495+ ("code" .=) <$> _ccCode, ("id" .=) <$> _ccId])
496+
370497-- | The targeting information of this custom channel, if activated.
371498--
372499-- /See:/ 'customChannelTargetingInfo' smart constructor.
@@ -426,6 +553,24 @@ cctiDescription
426553 = lens _cctiDescription
427554 (\ s a -> s{_cctiDescription = a})
428555
556+instance FromJSON CustomChannelTargetingInfo where
557+ parseJSON
558+ = withObject "CustomChannelTargetingInfo"
559+ (\ o ->
560+ CustomChannelTargetingInfo <$>
561+ (o .:? "location") <*> (o .:? "siteLanguage") <*>
562+ (o .:? "adsAppearOn")
563+ <*> (o .:? "description"))
564+
565+instance ToJSON CustomChannelTargetingInfo where
566+ toJSON CustomChannelTargetingInfo{..}
567+ = object
568+ (catMaybes
569+ [("location" .=) <$> _cctiLocation,
570+ ("siteLanguage" .=) <$> _cctiSiteLanguage,
571+ ("adsAppearOn" .=) <$> _cctiAdsAppearOn,
572+ ("description" .=) <$> _cctiDescription])
573+
429574--
430575-- /See:/ 'customChannels' smart constructor.
431576data CustomChannels = CustomChannels
@@ -478,6 +623,23 @@ cItems
478623 = lens _cItems (\ s a -> s{_cItems = a}) . _Default .
479624 _Coerce
480625
626+instance FromJSON CustomChannels where
627+ parseJSON
628+ = withObject "CustomChannels"
629+ (\ o ->
630+ CustomChannels <$>
631+ (o .:? "etag") <*> (o .:? "nextPageToken") <*>
632+ (o .:? "kind" .!= "adexchangeseller#customChannels")
633+ <*> (o .:? "items" .!= mempty))
634+
635+instance ToJSON CustomChannels where
636+ toJSON CustomChannels{..}
637+ = object
638+ (catMaybes
639+ [("etag" .=) <$> _cEtag,
640+ ("nextPageToken" .=) <$> _cNextPageToken,
641+ Just ("kind" .= _cKind), ("items" .=) <$> _cItems])
642+
481643--
482644-- /See:/ 'metadata' smart constructor.
483645data Metadata = Metadata
@@ -509,6 +671,20 @@ mItems
509671 = lens _mItems (\ s a -> s{_mItems = a}) . _Default .
510672 _Coerce
511673
674+instance FromJSON Metadata where
675+ parseJSON
676+ = withObject "Metadata"
677+ (\ o ->
678+ Metadata <$>
679+ (o .:? "kind" .!= "adexchangeseller#metadata") <*>
680+ (o .:? "items" .!= mempty))
681+
682+instance ToJSON Metadata where
683+ toJSON Metadata{..}
684+ = object
685+ (catMaybes
686+ [Just ("kind" .= _mKind), ("items" .=) <$> _mItems])
687+
512688--
513689-- /See:/ 'preferredDeal' smart constructor.
514690data PreferredDeal = PreferredDeal
@@ -603,6 +779,32 @@ pdFixedCpm :: Lens' PreferredDeal (Maybe Int64)
603779pdFixedCpm
604780 = lens _pdFixedCpm (\ s a -> s{_pdFixedCpm = a})
605781
782+instance FromJSON PreferredDeal where
783+ parseJSON
784+ = withObject "PreferredDeal"
785+ (\ o ->
786+ PreferredDeal <$>
787+ (o .:? "advertiserName") <*> (o .:? "currencyCode")
788+ <*> (o .:? "startTime")
789+ <*>
790+ (o .:? "kind" .!= "adexchangeseller#preferredDeal")
791+ <*> (o .:? "buyerNetworkName")
792+ <*> (o .:? "endTime")
793+ <*> (o .:? "id")
794+ <*> (o .:? "fixedCpm"))
795+
796+instance ToJSON PreferredDeal where
797+ toJSON PreferredDeal{..}
798+ = object
799+ (catMaybes
800+ [("advertiserName" .=) <$> _pdAdvertiserName,
801+ ("currencyCode" .=) <$> _pdCurrencyCode,
802+ ("startTime" .=) <$> _pdStartTime,
803+ Just ("kind" .= _pdKind),
804+ ("buyerNetworkName" .=) <$> _pdBuyerNetworkName,
805+ ("endTime" .=) <$> _pdEndTime, ("id" .=) <$> _pdId,
806+ ("fixedCpm" .=) <$> _pdFixedCpm])
807+
606808--
607809-- /See:/ 'preferredDeals' smart constructor.
608810data PreferredDeals = PreferredDeals
@@ -635,6 +837,20 @@ pItems
635837 = lens _pItems (\ s a -> s{_pItems = a}) . _Default .
636838 _Coerce
637839
840+instance FromJSON PreferredDeals where
841+ parseJSON
842+ = withObject "PreferredDeals"
843+ (\ o ->
844+ PreferredDeals <$>
845+ (o .:? "kind" .!= "adexchangeseller#preferredDeals")
846+ <*> (o .:? "items" .!= mempty))
847+
848+instance ToJSON PreferredDeals where
849+ toJSON PreferredDeals{..}
850+ = object
851+ (catMaybes
852+ [Just ("kind" .= _pKind), ("items" .=) <$> _pItems])
853+
638854--
639855-- /See:/ 'report' smart constructor.
640856data Report = Report
@@ -729,6 +945,30 @@ rTotalMatchedRows
729945 = lens _rTotalMatchedRows
730946 (\ s a -> s{_rTotalMatchedRows = a})
731947
948+instance FromJSON Report where
949+ parseJSON
950+ = withObject "Report"
951+ (\ o ->
952+ Report <$>
953+ (o .:? "kind" .!= "adexchangeseller#report") <*>
954+ (o .:? "averages" .!= mempty)
955+ <*> (o .:? "warnings" .!= mempty)
956+ <*> (o .:? "rows" .!= mempty)
957+ <*> (o .:? "totals" .!= mempty)
958+ <*> (o .:? "headers" .!= mempty)
959+ <*> (o .:? "totalMatchedRows"))
960+
961+instance ToJSON Report where
962+ toJSON Report{..}
963+ = object
964+ (catMaybes
965+ [Just ("kind" .= _rKind),
966+ ("averages" .=) <$> _rAverages,
967+ ("warnings" .=) <$> _rWarnings,
968+ ("rows" .=) <$> _rRows, ("totals" .=) <$> _rTotals,
969+ ("headers" .=) <$> _rHeaders,
970+ ("totalMatchedRows" .=) <$> _rTotalMatchedRows])
971+
732972--
733973-- /See:/ 'reportItemHeaders' smart constructor.
734974data ReportItemHeaders = ReportItemHeaders
@@ -770,6 +1010,22 @@ rihCurrency
7701010rihType :: Lens' ReportItemHeaders (Maybe Text)
7711011rihType = lens _rihType (\ s a -> s{_rihType = a})
7721012
1013+instance FromJSON ReportItemHeaders where
1014+ parseJSON
1015+ = withObject "ReportItemHeaders"
1016+ (\ o ->
1017+ ReportItemHeaders <$>
1018+ (o .:? "name") <*> (o .:? "currency") <*>
1019+ (o .:? "type"))
1020+
1021+instance ToJSON ReportItemHeaders where
1022+ toJSON ReportItemHeaders{..}
1023+ = object
1024+ (catMaybes
1025+ [("name" .=) <$> _rihName,
1026+ ("currency" .=) <$> _rihCurrency,
1027+ ("type" .=) <$> _rihType])
1028+
7731029--
7741030-- /See:/ 'reportingMetadataEntry' smart constructor.
7751031data ReportingMetadataEntry = ReportingMetadataEntry
@@ -872,6 +1128,33 @@ rmeSupportedProducts
8721128 . _Default
8731129 . _Coerce
8741130
1131+instance FromJSON ReportingMetadataEntry where
1132+ parseJSON
1133+ = withObject "ReportingMetadataEntry"
1134+ (\ o ->
1135+ ReportingMetadataEntry <$>
1136+ (o .:? "kind" .!=
1137+ "adexchangeseller#reportingMetadataEntry")
1138+ <*> (o .:? "requiredMetrics" .!= mempty)
1139+ <*> (o .:? "compatibleMetrics" .!= mempty)
1140+ <*> (o .:? "requiredDimensions" .!= mempty)
1141+ <*> (o .:? "id")
1142+ <*> (o .:? "compatibleDimensions" .!= mempty)
1143+ <*> (o .:? "supportedProducts" .!= mempty))
1144+
1145+instance ToJSON ReportingMetadataEntry where
1146+ toJSON ReportingMetadataEntry{..}
1147+ = object
1148+ (catMaybes
1149+ [Just ("kind" .= _rmeKind),
1150+ ("requiredMetrics" .=) <$> _rmeRequiredMetrics,
1151+ ("compatibleMetrics" .=) <$> _rmeCompatibleMetrics,
1152+ ("requiredDimensions" .=) <$> _rmeRequiredDimensions,
1153+ ("id" .=) <$> _rmeId,
1154+ ("compatibleDimensions" .=) <$>
1155+ _rmeCompatibleDimensions,
1156+ ("supportedProducts" .=) <$> _rmeSupportedProducts])
1157+
8751158--
8761159-- /See:/ 'savedReport' smart constructor.
8771160data SavedReport = SavedReport
@@ -910,6 +1193,22 @@ sName = lens _sName (\ s a -> s{_sName = a})
9101193sId :: Lens' SavedReport (Maybe Text)
9111194sId = lens _sId (\ s a -> s{_sId = a})
9121195
1196+instance FromJSON SavedReport where
1197+ parseJSON
1198+ = withObject "SavedReport"
1199+ (\ o ->
1200+ SavedReport <$>
1201+ (o .:? "kind" .!= "adexchangeseller#savedReport") <*>
1202+ (o .:? "name")
1203+ <*> (o .:? "id"))
1204+
1205+instance ToJSON SavedReport where
1206+ toJSON SavedReport{..}
1207+ = object
1208+ (catMaybes
1209+ [Just ("kind" .= _sKind), ("name" .=) <$> _sName,
1210+ ("id" .=) <$> _sId])
1211+
9131212--
9141213-- /See:/ 'savedReports' smart constructor.
9151214data SavedReports = SavedReports
@@ -962,6 +1261,23 @@ srItems
9621261 = lens _srItems (\ s a -> s{_srItems = a}) . _Default
9631262 . _Coerce
9641263
1264+instance FromJSON SavedReports where
1265+ parseJSON
1266+ = withObject "SavedReports"
1267+ (\ o ->
1268+ SavedReports <$>
1269+ (o .:? "etag") <*> (o .:? "nextPageToken") <*>
1270+ (o .:? "kind" .!= "adexchangeseller#savedReports")
1271+ <*> (o .:? "items" .!= mempty))
1272+
1273+instance ToJSON SavedReports where
1274+ toJSON SavedReports{..}
1275+ = object
1276+ (catMaybes
1277+ [("etag" .=) <$> _srEtag,
1278+ ("nextPageToken" .=) <$> _srNextPageToken,
1279+ Just ("kind" .= _srKind), ("items" .=) <$> _srItems])
1280+
9651281--
9661282-- /See:/ 'urlChannel' smart constructor.
9671283data UrlChannel = UrlChannel
@@ -1004,6 +1320,22 @@ ucUrlPattern :: Lens' UrlChannel (Maybe Text)
10041320ucUrlPattern
10051321 = lens _ucUrlPattern (\ s a -> s{_ucUrlPattern = a})
10061322
1323+instance FromJSON UrlChannel where
1324+ parseJSON
1325+ = withObject "UrlChannel"
1326+ (\ o ->
1327+ UrlChannel <$>
1328+ (o .:? "kind" .!= "adexchangeseller#urlChannel") <*>
1329+ (o .:? "id")
1330+ <*> (o .:? "urlPattern"))
1331+
1332+instance ToJSON UrlChannel where
1333+ toJSON UrlChannel{..}
1334+ = object
1335+ (catMaybes
1336+ [Just ("kind" .= _ucKind), ("id" .=) <$> _ucId,
1337+ ("urlPattern" .=) <$> _ucUrlPattern])
1338+
10071339--
10081340-- /See:/ 'urlChannels' smart constructor.
10091341data UrlChannels = UrlChannels
@@ -1056,3 +1388,21 @@ urlcItems
10561388 = lens _urlcItems (\ s a -> s{_urlcItems = a}) .
10571389 _Default
10581390 . _Coerce
1391+
1392+instance FromJSON UrlChannels where
1393+ parseJSON
1394+ = withObject "UrlChannels"
1395+ (\ o ->
1396+ UrlChannels <$>
1397+ (o .:? "etag") <*> (o .:? "nextPageToken") <*>
1398+ (o .:? "kind" .!= "adexchangeseller#urlChannels")
1399+ <*> (o .:? "items" .!= mempty))
1400+
1401+instance ToJSON UrlChannels where
1402+ toJSON UrlChannels{..}
1403+ = object
1404+ (catMaybes
1405+ [("etag" .=) <$> _urlcEtag,
1406+ ("nextPageToken" .=) <$> _urlcNextPageToken,
1407+ Just ("kind" .= _urlcKind),
1408+ ("items" .=) <$> _urlcItems])
gogol-admin/gen/Network/Google/Admin/DataTransfer.hs+68−51
@@ -96,70 +96,87 @@ type TransfersAPI =
9696
9797-- | Inserts a data transfer request.
9898type TransfersInsert =
99− "admin" :> "datatransfer" :> "v1" :> "transfers" :>
100− QueryParam "quotaUser" Text
101− :> QueryParam "prettyPrint" Bool
102− :> QueryParam "userIp" Text
103− :> QueryParam "key" Text
104− :> QueryParam "oauth_token" Text
105− :> QueryParam "fields" Text
106− :> QueryParam "alt" Text
99+ "admin" :>
100+ "datatransfer" :>
101+ "v1" :>
102+ "transfers" :>
103+ QueryParam "quotaUser" Text :>
104+ QueryParam "prettyPrint" Bool :>
105+ QueryParam "userIp" Text :>
106+ QueryParam "key" Text :>
107+ QueryParam "oauth_token" Text :>
108+ QueryParam "fields" Text :>
109+ QueryParam "alt" Text :> Post '[JSON] DataTransfer
107110
108111-- | Lists the transfers for a customer by source user, destination user, or
109112-- status.
110113type TransfersList =
111− "admin" :> "datatransfer" :> "v1" :> "transfers" :>
112− QueryParam "status" Text
113− :> QueryParam "quotaUser" Text
114− :> QueryParam "prettyPrint" Bool
115− :> QueryParam "oldOwnerUserId" Text
116− :> QueryParam "userIp" Text
117− :> QueryParam "newOwnerUserId" Text
118− :> QueryParam "customerId" Text
119− :> QueryParam "key" Text
120− :> QueryParam "pageToken" Text
121− :> QueryParam "oauth_token" Text
122− :> QueryParam "maxResults" Natural
123− :> QueryParam "fields" Text
124− :> QueryParam "alt" Text
114+ "admin" :>
115+ "datatransfer" :>
116+ "v1" :>
117+ "transfers" :>
118+ QueryParam "status" Text :>
119+ QueryParam "quotaUser" Text :>
120+ QueryParam "prettyPrint" Bool :>
121+ QueryParam "oldOwnerUserId" Text :>
122+ QueryParam "userIp" Text :>
123+ QueryParam "newOwnerUserId" Text :>
124+ QueryParam "customerId" Text :>
125+ QueryParam "key" Text :>
126+ QueryParam "pageToken" Text :>
127+ QueryParam "oauth_token" Text :>
128+ QueryParam "maxResults" Natural :>
129+ QueryParam "fields" Text :>
130+ QueryParam "alt" Text :>
131+ Get '[JSON] DataTransfersListResponse
125132
126133-- | Retrieves a data transfer request by its resource ID.
127134type TransfersGet =
128− "admin" :> "datatransfer" :> "v1" :> "transfers" :>
129− Capture "dataTransferId" Text
130− :> QueryParam "quotaUser" Text
131− :> QueryParam "prettyPrint" Bool
132− :> QueryParam "userIp" Text
133− :> QueryParam "key" Text
134− :> QueryParam "oauth_token" Text
135− :> QueryParam "fields" Text
136− :> QueryParam "alt" Text
135+ "admin" :>
136+ "datatransfer" :>
137+ "v1" :>
138+ "transfers" :>
139+ Capture "dataTransferId" Text :>
140+ QueryParam "quotaUser" Text :>
141+ QueryParam "prettyPrint" Bool :>
142+ QueryParam "userIp" Text :>
143+ QueryParam "key" Text :>
144+ QueryParam "oauth_token" Text :>
145+ QueryParam "fields" Text :>
146+ QueryParam "alt" Text :> Get '[JSON] DataTransfer
137147
138148type ApplicationsAPI =
139149 ApplicationsList :<|> ApplicationsGet
140150
141151-- | Lists the applications available for data transfer for a customer.
142152type ApplicationsList =
143− "admin" :> "datatransfer" :> "v1" :> "applications"
144− :> QueryParam "quotaUser" Text
145− :> QueryParam "prettyPrint" Bool
146− :> QueryParam "userIp" Text
147− :> QueryParam "customerId" Text
148− :> QueryParam "key" Text
149− :> QueryParam "pageToken" Text
150− :> QueryParam "oauth_token" Text
151− :> QueryParam "maxResults" Natural
152− :> QueryParam "fields" Text
153− :> QueryParam "alt" Text
153+ "admin" :>
154+ "datatransfer" :>
155+ "v1" :>
156+ "applications" :>
157+ QueryParam "quotaUser" Text :>
158+ QueryParam "prettyPrint" Bool :>
159+ QueryParam "userIp" Text :>
160+ QueryParam "customerId" Text :>
161+ QueryParam "key" Text :>
162+ QueryParam "pageToken" Text :>
163+ QueryParam "oauth_token" Text :>
164+ QueryParam "maxResults" Natural :>
165+ QueryParam "fields" Text :>
166+ QueryParam "alt" Text :>
167+ Get '[JSON] ApplicationsListResponse
154168
155169-- | Retrieves information about an application for the given application ID.
156170type ApplicationsGet =
157− "admin" :> "datatransfer" :> "v1" :> "applications"
158− :> Capture "applicationId" Int64
159− :> QueryParam "quotaUser" Text
160− :> QueryParam "prettyPrint" Bool
161− :> QueryParam "userIp" Text
162− :> QueryParam "key" Text
163− :> QueryParam "oauth_token" Text
164− :> QueryParam "fields" Text
165− :> QueryParam "alt" Text
171+ "admin" :>
172+ "datatransfer" :>
173+ "v1" :>
174+ "applications" :>
175+ Capture "applicationId" Int64 :>
176+ QueryParam "quotaUser" Text :>
177+ QueryParam "prettyPrint" Bool :>
178+ QueryParam "userIp" Text :>
179+ QueryParam "key" Text :>
180+ QueryParam "oauth_token" Text :>
181+ QueryParam "fields" Text :>
182+ QueryParam "alt" Text :> Get '[JSON] Application
gogol-admin/gen/Network/Google/Admin/DataTransfer/Types/Product.hs+120
@@ -1,6 +1,7 @@
11{-# LANGUAGE DeriveDataTypeable #-}
22{-# LANGUAGE DeriveGeneric #-}
33{-# LANGUAGE OverloadedStrings #-}
4+{-# LANGUAGE RecordWildCards #-}
45
56{-# OPTIONS_GHC -fno-warn-unused-imports #-}
67
@@ -78,6 +79,27 @@ aName = lens _aName (\ s a -> s{_aName = a})
7879aId :: Lens' Application (Maybe Int64)
7980aId = lens _aId (\ s a -> s{_aId = a})
8081
82+instance FromJSON Application where
83+ parseJSON
84+ = withObject "Application"
85+ (\ o ->
86+ Application <$>
87+ (o .:? "transferParams" .!= mempty) <*>
88+ (o .:? "etag")
89+ <*>
90+ (o .:? "kind" .!=
91+ "admin#datatransfer#ApplicationResource")
92+ <*> (o .:? "name")
93+ <*> (o .:? "id"))
94+
95+instance ToJSON Application where
96+ toJSON Application{..}
97+ = object
98+ (catMaybes
99+ [("transferParams" .=) <$> _aTransferParams,
100+ ("etag" .=) <$> _aEtag, Just ("kind" .= _aKind),
101+ ("name" .=) <$> _aName, ("id" .=) <$> _aId])
102+
81103-- | Template to map fields of ApplicationDataTransfer resource.
82104--
83105-- /See:/ 'applicationDataTransfer' smart constructor.
@@ -127,6 +149,25 @@ adtApplicationTransferStatus
127149 = lens _adtApplicationTransferStatus
128150 (\ s a -> s{_adtApplicationTransferStatus = a})
129151
152+instance FromJSON ApplicationDataTransfer where
153+ parseJSON
154+ = withObject "ApplicationDataTransfer"
155+ (\ o ->
156+ ApplicationDataTransfer <$>
157+ (o .:? "applicationTransferParams" .!= mempty) <*>
158+ (o .:? "applicationId")
159+ <*> (o .:? "applicationTransferStatus"))
160+
161+instance ToJSON ApplicationDataTransfer where
162+ toJSON ApplicationDataTransfer{..}
163+ = object
164+ (catMaybes
165+ [("applicationTransferParams" .=) <$>
166+ _adtApplicationTransferParams,
167+ ("applicationId" .=) <$> _adtApplicationId,
168+ ("applicationTransferStatus" .=) <$>
169+ _adtApplicationTransferStatus])
170+
130171-- | Template for application transfer parameters.
131172--
132173-- /See:/ 'applicationTransferParam' smart constructor.
@@ -162,6 +203,19 @@ atpValue
162203atpKey :: Lens' ApplicationTransferParam (Maybe Text)
163204atpKey = lens _atpKey (\ s a -> s{_atpKey = a})
164205
206+instance FromJSON ApplicationTransferParam where
207+ parseJSON
208+ = withObject "ApplicationTransferParam"
209+ (\ o ->
210+ ApplicationTransferParam <$>
211+ (o .:? "value" .!= mempty) <*> (o .:? "key"))
212+
213+instance ToJSON ApplicationTransferParam where
214+ toJSON ApplicationTransferParam{..}
215+ = object
216+ (catMaybes
217+ [("value" .=) <$> _atpValue, ("key" .=) <$> _atpKey])
218+
165219-- | Template for a collection of Applications.
166220--
167221-- /See:/ 'applicationsListResponse' smart constructor.
@@ -216,6 +270,25 @@ alrApplications
216270 . _Default
217271 . _Coerce
218272
273+instance FromJSON ApplicationsListResponse where
274+ parseJSON
275+ = withObject "ApplicationsListResponse"
276+ (\ o ->
277+ ApplicationsListResponse <$>
278+ (o .:? "etag") <*> (o .:? "nextPageToken") <*>
279+ (o .:? "kind" .!=
280+ "admin#datatransfer#applicationsList")
281+ <*> (o .:? "applications" .!= mempty))
282+
283+instance ToJSON ApplicationsListResponse where
284+ toJSON ApplicationsListResponse{..}
285+ = object
286+ (catMaybes
287+ [("etag" .=) <$> _alrEtag,
288+ ("nextPageToken" .=) <$> _alrNextPageToken,
289+ Just ("kind" .= _alrKind),
290+ ("applications" .=) <$> _alrApplications])
291+
219292-- | The JSON template for a DataTransfer resource.
220293--
221294-- /See:/ 'dataTransfer' smart constructor.
@@ -311,6 +384,34 @@ dtOverallTransferStatusCode
311384 = lens _dtOverallTransferStatusCode
312385 (\ s a -> s{_dtOverallTransferStatusCode = a})
313386
387+instance FromJSON DataTransfer where
388+ parseJSON
389+ = withObject "DataTransfer"
390+ (\ o ->
391+ DataTransfer <$>
392+ (o .:? "etag") <*> (o .:? "oldOwnerUserId") <*>
393+ (o .:? "kind" .!= "admin#datatransfer#DataTransfer")
394+ <*> (o .:? "newOwnerUserId")
395+ <*> (o .:? "requestTime")
396+ <*> (o .:? "applicationDataTransfers" .!= mempty)
397+ <*> (o .:? "id")
398+ <*> (o .:? "overallTransferStatusCode"))
399+
400+instance ToJSON DataTransfer where
401+ toJSON DataTransfer{..}
402+ = object
403+ (catMaybes
404+ [("etag" .=) <$> _dtEtag,
405+ ("oldOwnerUserId" .=) <$> _dtOldOwnerUserId,
406+ Just ("kind" .= _dtKind),
407+ ("newOwnerUserId" .=) <$> _dtNewOwnerUserId,
408+ ("requestTime" .=) <$> _dtRequestTime,
409+ ("applicationDataTransfers" .=) <$>
410+ _dtApplicationDataTransfers,
411+ ("id" .=) <$> _dtId,
412+ ("overallTransferStatusCode" .=) <$>
413+ _dtOverallTransferStatusCode])
414+
314415-- | Template for a collection of DataTransfer resources.
315416--
316417-- /See:/ 'dataTransfersListResponse' smart constructor.
@@ -363,3 +464,22 @@ dtlrDataTransfers
363464 (\ s a -> s{_dtlrDataTransfers = a})
364465 . _Default
365466 . _Coerce
467+
468+instance FromJSON DataTransfersListResponse where
469+ parseJSON
470+ = withObject "DataTransfersListResponse"
471+ (\ o ->
472+ DataTransfersListResponse <$>
473+ (o .:? "etag") <*> (o .:? "nextPageToken") <*>
474+ (o .:? "kind" .!=
475+ "admin#datatransfer#dataTransfersList")
476+ <*> (o .:? "dataTransfers" .!= mempty))
477+
478+instance ToJSON DataTransfersListResponse where
479+ toJSON DataTransfersListResponse{..}
480+ = object
481+ (catMaybes
482+ [("etag" .=) <$> _dtlrEtag,
483+ ("nextPageToken" .=) <$> _dtlrNextPageToken,
484+ Just ("kind" .= _dtlrKind),
485+ ("dataTransfers" .=) <$> _dtlrDataTransfers])
gogol-admin/gen/Network/Google/Admin/Directory.hs+756−591
@@ -597,43 +597,52 @@ type AliasesAPI =
597597
598598-- | Add a alias for the group
599599type AliasesInsert =
600− "admin" :> "directory" :> "v1" :> "groups" :>
601− Capture "groupKey" Text
602− :> "aliases"
603− :> QueryParam "quotaUser" Text
604− :> QueryParam "prettyPrint" Bool
605− :> QueryParam "userIp" Text
606− :> QueryParam "key" Text
607− :> QueryParam "oauth_token" Text
608− :> QueryParam "fields" Text
609− :> QueryParam "alt" Text
600+ "admin" :>
601+ "directory" :>
602+ "v1" :>
603+ "groups" :>
604+ Capture "groupKey" Text :>
605+ "aliases" :>
606+ QueryParam "quotaUser" Text :>
607+ QueryParam "prettyPrint" Bool :>
608+ QueryParam "userIp" Text :>
609+ QueryParam "key" Text :>
610+ QueryParam "oauth_token" Text :>
611+ QueryParam "fields" Text :>
612+ QueryParam "alt" Text :> Post '[JSON] Alias
610613
611614-- | List all aliases for a group
612615type AliasesList =
613− "admin" :> "directory" :> "v1" :> "groups" :>
614− Capture "groupKey" Text
615− :> "aliases"
616− :> QueryParam "quotaUser" Text
617− :> QueryParam "prettyPrint" Bool
618− :> QueryParam "userIp" Text
619− :> QueryParam "key" Text
620− :> QueryParam "oauth_token" Text
621− :> QueryParam "fields" Text
622− :> QueryParam "alt" Text
616+ "admin" :>
617+ "directory" :>
618+ "v1" :>
619+ "groups" :>
620+ Capture "groupKey" Text :>
621+ "aliases" :>
622+ QueryParam "quotaUser" Text :>
623+ QueryParam "prettyPrint" Bool :>
624+ QueryParam "userIp" Text :>
625+ QueryParam "key" Text :>
626+ QueryParam "oauth_token" Text :>
627+ QueryParam "fields" Text :>
628+ QueryParam "alt" Text :> Get '[JSON] Aliases
623629
624630-- | Remove a alias for the group
625631type AliasesDelete =
626− "admin" :> "directory" :> "v1" :> "groups" :>
627− Capture "groupKey" Text
628− :> "aliases"
629− :> Capture "alias" Text
630− :> QueryParam "quotaUser" Text
631− :> QueryParam "prettyPrint" Bool
632− :> QueryParam "userIp" Text
633− :> QueryParam "key" Text
634− :> QueryParam "oauth_token" Text
635− :> QueryParam "fields" Text
636− :> QueryParam "alt" Text
632+ "admin" :>
633+ "directory" :>
634+ "v1" :>
635+ "groups" :>
636+ Capture "groupKey" Text :>
637+ "aliases" :>
638+ Capture "alias" Text :>
639+ QueryParam "quotaUser" Text :>
640+ QueryParam "prettyPrint" Bool :>
641+ QueryParam "userIp" Text :>
642+ QueryParam "key" Text :>
643+ QueryParam "oauth_token" Text :>
644+ QueryParam "fields" Text :>
645+ QueryParam "alt" Text :> Delete '[JSON] ()
637646
638647type UsersAPI = AliasesAPI :<|> PhotosAPI
639648
@@ -643,59 +652,71 @@ type AliasesAPI =
643652
644653-- | Add a alias for the user
645654type AliasesInsert =
646− "admin" :> "directory" :> "v1" :> "users" :>
647− Capture "userKey" Text
648− :> "aliases"
649− :> QueryParam "quotaUser" Text
650− :> QueryParam "prettyPrint" Bool
651− :> QueryParam "userIp" Text
652− :> QueryParam "key" Text
653− :> QueryParam "oauth_token" Text
654− :> QueryParam "fields" Text
655− :> QueryParam "alt" Text
655+ "admin" :>
656+ "directory" :>
657+ "v1" :>
658+ "users" :>
659+ Capture "userKey" Text :>
660+ "aliases" :>
661+ QueryParam "quotaUser" Text :>
662+ QueryParam "prettyPrint" Bool :>
663+ QueryParam "userIp" Text :>
664+ QueryParam "key" Text :>
665+ QueryParam "oauth_token" Text :>
666+ QueryParam "fields" Text :>
667+ QueryParam "alt" Text :> Post '[JSON] Alias
656668
657669-- | List all aliases for a user
658670type AliasesList =
659− "admin" :> "directory" :> "v1" :> "users" :>
660− Capture "userKey" Text
661− :> "aliases"
662− :> QueryParam "event" Text
663− :> QueryParam "quotaUser" Text
664− :> QueryParam "prettyPrint" Bool
665− :> QueryParam "userIp" Text
666− :> QueryParam "key" Text
667− :> QueryParam "oauth_token" Text
668− :> QueryParam "fields" Text
669− :> QueryParam "alt" Text
671+ "admin" :>
672+ "directory" :>
673+ "v1" :>
674+ "users" :>
675+ Capture "userKey" Text :>
676+ "aliases" :>
677+ QueryParam "event" Text :>
678+ QueryParam "quotaUser" Text :>
679+ QueryParam "prettyPrint" Bool :>
680+ QueryParam "userIp" Text :>
681+ QueryParam "key" Text :>
682+ QueryParam "oauth_token" Text :>
683+ QueryParam "fields" Text :>
684+ QueryParam "alt" Text :> Get '[JSON] Aliases
670685
671686-- | Remove a alias for the user
672687type AliasesDelete =
673− "admin" :> "directory" :> "v1" :> "users" :>
674− Capture "userKey" Text
675− :> "aliases"
676− :> Capture "alias" Text
677− :> QueryParam "quotaUser" Text
678− :> QueryParam "prettyPrint" Bool
679− :> QueryParam "userIp" Text
680− :> QueryParam "key" Text
681− :> QueryParam "oauth_token" Text
682− :> QueryParam "fields" Text
683− :> QueryParam "alt" Text
688+ "admin" :>
689+ "directory" :>
690+ "v1" :>
691+ "users" :>
692+ Capture "userKey" Text :>
693+ "aliases" :>
694+ Capture "alias" Text :>
695+ QueryParam "quotaUser" Text :>
696+ QueryParam "prettyPrint" Bool :>
697+ QueryParam "userIp" Text :>
698+ QueryParam "key" Text :>
699+ QueryParam "oauth_token" Text :>
700+ QueryParam "fields" Text :>
701+ QueryParam "alt" Text :> Delete '[JSON] ()
684702
685703-- | Watch for changes in user aliases list
686704type AliasesWatch =
687− "admin" :> "directory" :> "v1" :> "users" :>
688− Capture "userKey" Text
689− :> "aliases"
690− :> "watch"
691− :> QueryParam "event" Text
692− :> QueryParam "quotaUser" Text
693− :> QueryParam "prettyPrint" Bool
694− :> QueryParam "userIp" Text
695− :> QueryParam "key" Text
696− :> QueryParam "oauth_token" Text
697− :> QueryParam "fields" Text
698− :> QueryParam "alt" Text
705+ "admin" :>
706+ "directory" :>
707+ "v1" :>
708+ "users" :>
709+ Capture "userKey" Text :>
710+ "aliases" :>
711+ "watch" :>
712+ QueryParam "event" Text :>
713+ QueryParam "quotaUser" Text :>
714+ QueryParam "prettyPrint" Bool :>
715+ QueryParam "userIp" Text :>
716+ QueryParam "key" Text :>
717+ QueryParam "oauth_token" Text :>
718+ QueryParam "fields" Text :>
719+ QueryParam "alt" Text :> Post '[JSON] Channel
699720
700721type PhotosAPI =
701722 PhotosPatch :<|> PhotosGet :<|> PhotosDelete :<|>
@@ -703,59 +724,71 @@ type PhotosAPI =
703724
704725-- | Add a photo for the user. This method supports patch semantics.
705726type PhotosPatch =
706− "admin" :> "directory" :> "v1" :> "users" :>
707− Capture "userKey" Text
708− :> "photos"
709− :> "thumbnail"
710− :> QueryParam "quotaUser" Text
711− :> QueryParam "prettyPrint" Bool
712− :> QueryParam "userIp" Text
713− :> QueryParam "key" Text
714− :> QueryParam "oauth_token" Text
715− :> QueryParam "fields" Text
716− :> QueryParam "alt" Text
727+ "admin" :>
728+ "directory" :>
729+ "v1" :>
730+ "users" :>
731+ Capture "userKey" Text :>
732+ "photos" :>
733+ "thumbnail" :>
734+ QueryParam "quotaUser" Text :>
735+ QueryParam "prettyPrint" Bool :>
736+ QueryParam "userIp" Text :>
737+ QueryParam "key" Text :>
738+ QueryParam "oauth_token" Text :>
739+ QueryParam "fields" Text :>
740+ QueryParam "alt" Text :> Patch '[JSON] UserPhoto
717741
718742-- | Retrieve photo of a user
719743type PhotosGet =
720− "admin" :> "directory" :> "v1" :> "users" :>
721− Capture "userKey" Text
722− :> "photos"
723− :> "thumbnail"
724− :> QueryParam "quotaUser" Text
725− :> QueryParam "prettyPrint" Bool
726− :> QueryParam "userIp" Text
727− :> QueryParam "key" Text
728− :> QueryParam "oauth_token" Text
729− :> QueryParam "fields" Text
730− :> QueryParam "alt" Text
744+ "admin" :>
745+ "directory" :>
746+ "v1" :>
747+ "users" :>
748+ Capture "userKey" Text :>
749+ "photos" :>
750+ "thumbnail" :>
751+ QueryParam "quotaUser" Text :>
752+ QueryParam "prettyPrint" Bool :>
753+ QueryParam "userIp" Text :>
754+ QueryParam "key" Text :>
755+ QueryParam "oauth_token" Text :>
756+ QueryParam "fields" Text :>
757+ QueryParam "alt" Text :> Get '[JSON] UserPhoto
731758
732759-- | Remove photos for the user
733760type PhotosDelete =
734− "admin" :> "directory" :> "v1" :> "users" :>
735− Capture "userKey" Text
736− :> "photos"
737− :> "thumbnail"
738− :> QueryParam "quotaUser" Text
739− :> QueryParam "prettyPrint" Bool
740− :> QueryParam "userIp" Text
741− :> QueryParam "key" Text
742− :> QueryParam "oauth_token" Text
743− :> QueryParam "fields" Text
744− :> QueryParam "alt" Text
761+ "admin" :>
762+ "directory" :>
763+ "v1" :>
764+ "users" :>
765+ Capture "userKey" Text :>
766+ "photos" :>
767+ "thumbnail" :>
768+ QueryParam "quotaUser" Text :>
769+ QueryParam "prettyPrint" Bool :>
770+ QueryParam "userIp" Text :>
771+ QueryParam "key" Text :>
772+ QueryParam "oauth_token" Text :>
773+ QueryParam "fields" Text :>
774+ QueryParam "alt" Text :> Delete '[JSON] ()
745775
746776-- | Add a photo for the user
747777type PhotosUpdate =
748− "admin" :> "directory" :> "v1" :> "users" :>
749− Capture "userKey" Text
750− :> "photos"
751− :> "thumbnail"
752− :> QueryParam "quotaUser" Text
753− :> QueryParam "prettyPrint" Bool
754− :> QueryParam "userIp" Text
755− :> QueryParam "key" Text
756− :> QueryParam "oauth_token" Text
757− :> QueryParam "fields" Text
758− :> QueryParam "alt" Text
778+ "admin" :>
779+ "directory" :>
780+ "v1" :>
781+ "users" :>
782+ Capture "userKey" Text :>
783+ "photos" :>
784+ "thumbnail" :>
785+ QueryParam "quotaUser" Text :>
786+ QueryParam "prettyPrint" Bool :>
787+ QueryParam "userIp" Text :>
788+ QueryParam "key" Text :>
789+ QueryParam "oauth_token" Text :>
790+ QueryParam "fields" Text :>
791+ QueryParam "alt" Text :> Put '[JSON] UserPhoto
759792
760793type SchemasAPI =
761794 SchemasInsert :<|> SchemasList :<|> SchemasPatch :<|>
@@ -765,85 +798,103 @@ type SchemasAPI =
765798
766799-- | Create schema.
767800type SchemasInsert =
768− "admin" :> "directory" :> "v1" :> "customer" :>
769− Capture "customerId" Text
770− :> "schemas"
771− :> QueryParam "quotaUser" Text
772− :> QueryParam "prettyPrint" Bool
773− :> QueryParam "userIp" Text
774− :> QueryParam "key" Text
775− :> QueryParam "oauth_token" Text
776− :> QueryParam "fields" Text
777− :> QueryParam "alt" Text
801+ "admin" :>
802+ "directory" :>
803+ "v1" :>
804+ "customer" :>
805+ Capture "customerId" Text :>
806+ "schemas" :>
807+ QueryParam "quotaUser" Text :>
808+ QueryParam "prettyPrint" Bool :>
809+ QueryParam "userIp" Text :>
810+ QueryParam "key" Text :>
811+ QueryParam "oauth_token" Text :>
812+ QueryParam "fields" Text :>
813+ QueryParam "alt" Text :> Post '[JSON] Schema
778814
779815-- | Retrieve all schemas for a customer
780816type SchemasList =
781− "admin" :> "directory" :> "v1" :> "customer" :>
782− Capture "customerId" Text
783− :> "schemas"
784− :> QueryParam "quotaUser" Text
785− :> QueryParam "prettyPrint" Bool
786− :> QueryParam "userIp" Text
787− :> QueryParam "key" Text
788− :> QueryParam "oauth_token" Text
789− :> QueryParam "fields" Text
790− :> QueryParam "alt" Text
817+ "admin" :>
818+ "directory" :>
819+ "v1" :>
820+ "customer" :>
821+ Capture "customerId" Text :>
822+ "schemas" :>
823+ QueryParam "quotaUser" Text :>
824+ QueryParam "prettyPrint" Bool :>
825+ QueryParam "userIp" Text :>
826+ QueryParam "key" Text :>
827+ QueryParam "oauth_token" Text :>
828+ QueryParam "fields" Text :>
829+ QueryParam "alt" Text :> Get '[JSON] Schemas
791830
792831-- | Update schema. This method supports patch semantics.
793832type SchemasPatch =
794− "admin" :> "directory" :> "v1" :> "customer" :>
795− Capture "customerId" Text
796− :> "schemas"
797− :> Capture "schemaKey" Text
798− :> QueryParam "quotaUser" Text
799− :> QueryParam "prettyPrint" Bool
800− :> QueryParam "userIp" Text
801− :> QueryParam "key" Text
802− :> QueryParam "oauth_token" Text
803− :> QueryParam "fields" Text
804− :> QueryParam "alt" Text
833+ "admin" :>
834+ "directory" :>
835+ "v1" :>
836+ "customer" :>
837+ Capture "customerId" Text :>
838+ "schemas" :>
839+ Capture "schemaKey" Text :>
840+ QueryParam "quotaUser" Text :>
841+ QueryParam "prettyPrint" Bool :>
842+ QueryParam "userIp" Text :>
843+ QueryParam "key" Text :>
844+ QueryParam "oauth_token" Text :>
845+ QueryParam "fields" Text :>
846+ QueryParam "alt" Text :> Patch '[JSON] Schema
805847
806848-- | Retrieve schema
807849type SchemasGet =
808− "admin" :> "directory" :> "v1" :> "customer" :>
809− Capture "customerId" Text
810− :> "schemas"
811− :> Capture "schemaKey" Text
812− :> QueryParam "quotaUser" Text
813− :> QueryParam "prettyPrint" Bool
814− :> QueryParam "userIp" Text
815− :> QueryParam "key" Text
816− :> QueryParam "oauth_token" Text
817− :> QueryParam "fields" Text
818− :> QueryParam "alt" Text
850+ "admin" :>
851+ "directory" :>
852+ "v1" :>
853+ "customer" :>
854+ Capture "customerId" Text :>
855+ "schemas" :>
856+ Capture "schemaKey" Text :>
857+ QueryParam "quotaUser" Text :>
858+ QueryParam "prettyPrint" Bool :>
859+ QueryParam "userIp" Text :>
860+ QueryParam "key" Text :>
861+ QueryParam "oauth_token" Text :>
862+ QueryParam "fields" Text :>
863+ QueryParam "alt" Text :> Get '[JSON] Schema
819864
820865-- | Delete schema
821866type SchemasDelete =
822− "admin" :> "directory" :> "v1" :> "customer" :>
823− Capture "customerId" Text
824− :> "schemas"
825− :> Capture "schemaKey" Text
826− :> QueryParam "quotaUser" Text
827− :> QueryParam "prettyPrint" Bool
828− :> QueryParam "userIp" Text
829− :> QueryParam "key" Text
830− :> QueryParam "oauth_token" Text
831− :> QueryParam "fields" Text
832− :> QueryParam "alt" Text
867+ "admin" :>
868+ "directory" :>
869+ "v1" :>
870+ "customer" :>
871+ Capture "customerId" Text :>
872+ "schemas" :>
873+ Capture "schemaKey" Text :>
874+ QueryParam "quotaUser" Text :>
875+ QueryParam "prettyPrint" Bool :>
876+ QueryParam "userIp" Text :>
877+ QueryParam "key" Text :>
878+ QueryParam "oauth_token" Text :>
879+ QueryParam "fields" Text :>
880+ QueryParam "alt" Text :> Delete '[JSON] ()
833881
834882-- | Update schema
835883type SchemasUpdate =
836− "admin" :> "directory" :> "v1" :> "customer" :>
837− Capture "customerId" Text
838− :> "schemas"
839− :> Capture "schemaKey" Text
840− :> QueryParam "quotaUser" Text
841− :> QueryParam "prettyPrint" Bool
842− :> QueryParam "userIp" Text
843− :> QueryParam "key" Text
844− :> QueryParam "oauth_token" Text
845− :> QueryParam "fields" Text
846− :> QueryParam "alt" Text
884+ "admin" :>
885+ "directory" :>
886+ "v1" :>
887+ "customer" :>
888+ Capture "customerId" Text :>
889+ "schemas" :>
890+ Capture "schemaKey" Text :>
891+ QueryParam "quotaUser" Text :>
892+ QueryParam "prettyPrint" Bool :>
893+ QueryParam "userIp" Text :>
894+ QueryParam "key" Text :>
895+ QueryParam "oauth_token" Text :>
896+ QueryParam "fields" Text :>
897+ QueryParam "alt" Text :> Put '[JSON] Schema
847898
848899type TokensAPI =
849900 TokensList :<|> TokensGet :<|> TokensDelete
@@ -851,60 +902,72 @@ type TokensAPI =
851902-- | Returns the set of tokens specified user has issued to 3rd party
852903-- applications.
853904type TokensList =
854− "admin" :> "directory" :> "v1" :> "users" :>
855− Capture "userKey" Text
856− :> "tokens"
857− :> QueryParam "quotaUser" Text
858− :> QueryParam "prettyPrint" Bool
859− :> QueryParam "userIp" Text
860− :> QueryParam "key" Text
861− :> QueryParam "oauth_token" Text
862− :> QueryParam "fields" Text
863− :> QueryParam "alt" Text
905+ "admin" :>
906+ "directory" :>
907+ "v1" :>
908+ "users" :>
909+ Capture "userKey" Text :>
910+ "tokens" :>
911+ QueryParam "quotaUser" Text :>
912+ QueryParam "prettyPrint" Bool :>
913+ QueryParam "userIp" Text :>
914+ QueryParam "key" Text :>
915+ QueryParam "oauth_token" Text :>
916+ QueryParam "fields" Text :>
917+ QueryParam "alt" Text :> Get '[JSON] Tokens
864918
865919-- | Get information about an access token issued by a user.
866920type TokensGet =
867− "admin" :> "directory" :> "v1" :> "users" :>
868− Capture "userKey" Text
869− :> "tokens"
870− :> Capture "clientId" Text
871− :> QueryParam "quotaUser" Text
872− :> QueryParam "prettyPrint" Bool
873− :> QueryParam "userIp" Text
874− :> QueryParam "key" Text
875− :> QueryParam "oauth_token" Text
876− :> QueryParam "fields" Text
877− :> QueryParam "alt" Text
921+ "admin" :>
922+ "directory" :>
923+ "v1" :>
924+ "users" :>
925+ Capture "userKey" Text :>
926+ "tokens" :>
927+ Capture "clientId" Text :>
928+ QueryParam "quotaUser" Text :>
929+ QueryParam "prettyPrint" Bool :>
930+ QueryParam "userIp" Text :>
931+ QueryParam "key" Text :>
932+ QueryParam "oauth_token" Text :>
933+ QueryParam "fields" Text :>
934+ QueryParam "alt" Text :> Get '[JSON] Token
878935
879936-- | Delete all access tokens issued by a user for an application.
880937type TokensDelete =
881− "admin" :> "directory" :> "v1" :> "users" :>
882− Capture "userKey" Text
883− :> "tokens"
884− :> Capture "clientId" Text
885− :> QueryParam "quotaUser" Text
886− :> QueryParam "prettyPrint" Bool
887− :> QueryParam "userIp" Text
888− :> QueryParam "key" Text
889− :> QueryParam "oauth_token" Text
890− :> QueryParam "fields" Text
891− :> QueryParam "alt" Text
938+ "admin" :>
939+ "directory" :>
940+ "v1" :>
941+ "users" :>
942+ Capture "userKey" Text :>
943+ "tokens" :>
944+ Capture "clientId" Text :>
945+ QueryParam "quotaUser" Text :>
946+ QueryParam "prettyPrint" Bool :>
947+ QueryParam "userIp" Text :>
948+ QueryParam "key" Text :>
949+ QueryParam "oauth_token" Text :>
950+ QueryParam "fields" Text :>
951+ QueryParam "alt" Text :> Delete '[JSON] ()
892952
893953type ChannelsAPI = ChannelsStop
894954
895955-- | Stop watching resources through this channel
896956type ChannelsStop =
897− "admin" :> "directory" :> "v1" :> "admin" :>
898− "directory_v1"
899− :> "channels"
900− :> "stop"
901− :> QueryParam "quotaUser" Text
902− :> QueryParam "prettyPrint" Bool
903− :> QueryParam "userIp" Text
904− :> QueryParam "key" Text
905− :> QueryParam "oauth_token" Text
906− :> QueryParam "fields" Text
907− :> QueryParam "alt" Text
957+ "admin" :>
958+ "directory" :>
959+ "v1" :>
960+ "admin" :>
961+ "directory_v1" :>
962+ "channels" :>
963+ "stop" :>
964+ QueryParam "quotaUser" Text :>
965+ QueryParam "prettyPrint" Bool :>
966+ QueryParam "userIp" Text :>
967+ QueryParam "key" Text :>
968+ QueryParam "oauth_token" Text :>
969+ QueryParam "fields" Text :>
970+ QueryParam "alt" Text :> Post '[JSON] ()
908971
909972type MembersAPI =
910973 MembersInsert :<|> MembersList :<|> MembersPatch :<|>
@@ -914,89 +977,107 @@ type MembersAPI =
914977
915978-- | Add user to the specified group.
916979type MembersInsert =
917− "admin" :> "directory" :> "v1" :> "groups" :>
918− Capture "groupKey" Text
919− :> "members"
920− :> QueryParam "quotaUser" Text
921− :> QueryParam "prettyPrint" Bool
922− :> QueryParam "userIp" Text
923− :> QueryParam "key" Text
924− :> QueryParam "oauth_token" Text
925− :> QueryParam "fields" Text
926− :> QueryParam "alt" Text
980+ "admin" :>
981+ "directory" :>
982+ "v1" :>
983+ "groups" :>
984+ Capture "groupKey" Text :>
985+ "members" :>
986+ QueryParam "quotaUser" Text :>
987+ QueryParam "prettyPrint" Bool :>
988+ QueryParam "userIp" Text :>
989+ QueryParam "key" Text :>
990+ QueryParam "oauth_token" Text :>
991+ QueryParam "fields" Text :>
992+ QueryParam "alt" Text :> Post '[JSON] Member
927993
928994-- | Retrieve all members in a group (paginated)
929995type MembersList =
930− "admin" :> "directory" :> "v1" :> "groups" :>
931− Capture "groupKey" Text
932− :> "members"
933− :> QueryParam "quotaUser" Text
934− :> QueryParam "roles" Text
935− :> QueryParam "prettyPrint" Bool
936− :> QueryParam "userIp" Text
937− :> QueryParam "key" Text
938− :> QueryParam "pageToken" Text
939− :> QueryParam "oauth_token" Text
940− :> QueryParam "maxResults" Natural
941− :> QueryParam "fields" Text
942− :> QueryParam "alt" Text
996+ "admin" :>
997+ "directory" :>
998+ "v1" :>
999+ "groups" :>
1000+ Capture "groupKey" Text :>
1001+ "members" :>
1002+ QueryParam "quotaUser" Text :>
1003+ QueryParam "roles" Text :>
1004+ QueryParam "prettyPrint" Bool :>
1005+ QueryParam "userIp" Text :>
1006+ QueryParam "key" Text :>
1007+ QueryParam "pageToken" Text :>
1008+ QueryParam "oauth_token" Text :>
1009+ QueryParam "maxResults" Natural :>
1010+ QueryParam "fields" Text :>
1011+ QueryParam "alt" Text :> Get '[JSON] Members
9431012
9441013-- | Update membership of a user in the specified group. This method supports
9451014-- patch semantics.
9461015type MembersPatch =
947− "admin" :> "directory" :> "v1" :> "groups" :>
948− Capture "groupKey" Text
949− :> "members"
950− :> Capture "memberKey" Text
951− :> QueryParam "quotaUser" Text
952− :> QueryParam "prettyPrint" Bool
953− :> QueryParam "userIp" Text
954− :> QueryParam "key" Text
955− :> QueryParam "oauth_token" Text
956− :> QueryParam "fields" Text
957− :> QueryParam "alt" Text
1016+ "admin" :>
1017+ "directory" :>
1018+ "v1" :>
1019+ "groups" :>
1020+ Capture "groupKey" Text :>
1021+ "members" :>
1022+ Capture "memberKey" Text :>
1023+ QueryParam "quotaUser" Text :>
1024+ QueryParam "prettyPrint" Bool :>
1025+ QueryParam "userIp" Text :>
1026+ QueryParam "key" Text :>
1027+ QueryParam "oauth_token" Text :>
1028+ QueryParam "fields" Text :>
1029+ QueryParam "alt" Text :> Patch '[JSON] Member
9581030
9591031-- | Retrieve Group Member
9601032type MembersGet =
961− "admin" :> "directory" :> "v1" :> "groups" :>
962− Capture "groupKey" Text
963− :> "members"
964− :> Capture "memberKey" Text
965− :> QueryParam "quotaUser" Text
966− :> QueryParam "prettyPrint" Bool
967− :> QueryParam "userIp" Text
968− :> QueryParam "key" Text
969− :> QueryParam "oauth_token" Text
970− :> QueryParam "fields" Text
971− :> QueryParam "alt" Text
1033+ "admin" :>
1034+ "directory" :>
1035+ "v1" :>
1036+ "groups" :>
1037+ Capture "groupKey" Text :>
1038+ "members" :>
1039+ Capture "memberKey" Text :>
1040+ QueryParam "quotaUser" Text :>
1041+ QueryParam "prettyPrint" Bool :>
1042+ QueryParam "userIp" Text :>
1043+ QueryParam "key" Text :>
1044+ QueryParam "oauth_token" Text :>
1045+ QueryParam "fields" Text :>
1046+ QueryParam "alt" Text :> Get '[JSON] Member
9721047
9731048-- | Remove membership.
9741049type MembersDelete =
975− "admin" :> "directory" :> "v1" :> "groups" :>
976− Capture "groupKey" Text
977− :> "members"
978− :> Capture "memberKey" Text
979− :> QueryParam "quotaUser" Text
980− :> QueryParam "prettyPrint" Bool
981− :> QueryParam "userIp" Text
982− :> QueryParam "key" Text
983− :> QueryParam "oauth_token" Text
984− :> QueryParam "fields" Text
985− :> QueryParam "alt" Text
1050+ "admin" :>
1051+ "directory" :>
1052+ "v1" :>
1053+ "groups" :>
1054+ Capture "groupKey" Text :>
1055+ "members" :>
1056+ Capture "memberKey" Text :>
1057+ QueryParam "quotaUser" Text :>
1058+ QueryParam "prettyPrint" Bool :>
1059+ QueryParam "userIp" Text :>
1060+ QueryParam "key" Text :>
1061+ QueryParam "oauth_token" Text :>
1062+ QueryParam "fields" Text :>
1063+ QueryParam "alt" Text :> Delete '[JSON] ()
9861064
9871065-- | Update membership of a user in the specified group.
9881066type MembersUpdate =
989− "admin" :> "directory" :> "v1" :> "groups" :>
990− Capture "groupKey" Text
991− :> "members"
992− :> Capture "memberKey" Text
993− :> QueryParam "quotaUser" Text
994− :> QueryParam "prettyPrint" Bool
995− :> QueryParam "userIp" Text
996− :> QueryParam "key" Text
997− :> QueryParam "oauth_token" Text
998− :> QueryParam "fields" Text
999− :> QueryParam "alt" Text
1067+ "admin" :>
1068+ "directory" :>
1069+ "v1" :>
1070+ "groups" :>
1071+ Capture "groupKey" Text :>
1072+ "members" :>
1073+ Capture "memberKey" Text :>
1074+ QueryParam "quotaUser" Text :>
1075+ QueryParam "prettyPrint" Bool :>
1076+ QueryParam "userIp" Text :>
1077+ QueryParam "key" Text :>
1078+ QueryParam "oauth_token" Text :>
1079+ QueryParam "fields" Text :>
1080+ QueryParam "alt" Text :> Put '[JSON] Member
10001081
10011082type MobiledevicesAPI =
10021083 MobiledevicesList :<|> MobiledevicesGet :<|>
@@ -1005,70 +1086,84 @@ type MobiledevicesAPI =
10051086
10061087-- | Retrieve all Mobile Devices of a customer (paginated)
10071088type MobiledevicesList =
1008− "admin" :> "directory" :> "v1" :> "customer" :>
1009− Capture "customerId" Text
1010− :> "devices"
1011− :> "mobile"
1012− :> QueryParam "quotaUser" Text
1013− :> QueryParam "prettyPrint" Bool
1014− :> QueryParam "orderBy" Text
1015− :> QueryParam "userIp" Text
1016− :> QueryParam "sortOrder" Text
1017− :> QueryParam "key" Text
1018− :> QueryParam "query" Text
1019− :> QueryParam "projection" Text
1020− :> QueryParam "pageToken" Text
1021− :> QueryParam "oauth_token" Text
1022− :> QueryParam "maxResults" Natural
1023− :> QueryParam "fields" Text
1024− :> QueryParam "alt" Text
1089+ "admin" :>
1090+ "directory" :>
1091+ "v1" :>
1092+ "customer" :>
1093+ Capture "customerId" Text :>
1094+ "devices" :>
1095+ "mobile" :>
1096+ QueryParam "quotaUser" Text :>
1097+ QueryParam "prettyPrint" Bool :>
1098+ QueryParam "orderBy" Text :>
1099+ QueryParam "userIp" Text :>
1100+ QueryParam "sortOrder" Text :>
1101+ QueryParam "key" Text :>
1102+ QueryParam "query" Text :>
1103+ QueryParam "projection" Text :>
1104+ QueryParam "pageToken" Text :>
1105+ QueryParam "oauth_token" Text :>
1106+ QueryParam "maxResults" Natural :>
1107+ QueryParam "fields" Text :>
1108+ QueryParam "alt" Text :>
1109+ Get '[JSON] MobileDevices
10251110
10261111-- | Retrieve Mobile Device
10271112type MobiledevicesGet =
1028− "admin" :> "directory" :> "v1" :> "customer" :>
1029− Capture "customerId" Text
1030− :> "devices"
1031− :> "mobile"
1032− :> Capture "resourceId" Text
1033− :> QueryParam "quotaUser" Text
1034− :> QueryParam "prettyPrint" Bool
1035− :> QueryParam "userIp" Text
1036− :> QueryParam "key" Text
1037− :> QueryParam "projection" Text
1038− :> QueryParam "oauth_token" Text
1039− :> QueryParam "fields" Text
1040− :> QueryParam "alt" Text
1113+ "admin" :>
1114+ "directory" :>
1115+ "v1" :>
1116+ "customer" :>
1117+ Capture "customerId" Text :>
1118+ "devices" :>
1119+ "mobile" :>
1120+ Capture "resourceId" Text :>
1121+ QueryParam "quotaUser" Text :>
1122+ QueryParam "prettyPrint" Bool :>
1123+ QueryParam "userIp" Text :>
1124+ QueryParam "key" Text :>
1125+ QueryParam "projection" Text :>
1126+ QueryParam "oauth_token" Text :>
1127+ QueryParam "fields" Text :>
1128+ QueryParam "alt" Text :>
1129+ Get '[JSON] MobileDevice
10411130
10421131-- | Take action on Mobile Device
10431132type MobiledevicesAction =
1044− "admin" :> "directory" :> "v1" :> "customer" :>
1045− Capture "customerId" Text
1046− :> "devices"
1047− :> "mobile"
1048− :> Capture "resourceId" Text
1049− :> "action"
1050− :> QueryParam "quotaUser" Text
1051− :> QueryParam "prettyPrint" Bool
1052− :> QueryParam "userIp" Text
1053− :> QueryParam "key" Text
1054− :> QueryParam "oauth_token" Text
1055− :> QueryParam "fields" Text
1056− :> QueryParam "alt" Text
1133+ "admin" :>
1134+ "directory" :>
1135+ "v1" :>
1136+ "customer" :>
1137+ Capture "customerId" Text :>
1138+ "devices" :>
1139+ "mobile" :>
1140+ Capture "resourceId" Text :>
1141+ "action" :>
1142+ QueryParam "quotaUser" Text :>
1143+ QueryParam "prettyPrint" Bool :>
1144+ QueryParam "userIp" Text :>
1145+ QueryParam "key" Text :>
1146+ QueryParam "oauth_token" Text :>
1147+ QueryParam "fields" Text :>
1148+ QueryParam "alt" Text :> Post '[JSON] ()
10571149
10581150-- | Delete Mobile Device
10591151type MobiledevicesDelete =
1060− "admin" :> "directory" :> "v1" :> "customer" :>
1061− Capture "customerId" Text
1062− :> "devices"
1063− :> "mobile"
1064− :> Capture "resourceId" Text
1065− :> QueryParam "quotaUser" Text
1066− :> QueryParam "prettyPrint" Bool
1067− :> QueryParam "userIp" Text
1068− :> QueryParam "key" Text
1069− :> QueryParam "oauth_token" Text
1070− :> QueryParam "fields" Text
1071− :> QueryParam "alt" Text
1152+ "admin" :>
1153+ "directory" :>
1154+ "v1" :>
1155+ "customer" :>
1156+ Capture "customerId" Text :>
1157+ "devices" :>
1158+ "mobile" :>
1159+ Capture "resourceId" Text :>
1160+ QueryParam "quotaUser" Text :>
1161+ QueryParam "prettyPrint" Bool :>
1162+ QueryParam "userIp" Text :>
1163+ QueryParam "key" Text :>
1164+ QueryParam "oauth_token" Text :>
1165+ QueryParam "fields" Text :>
1166+ QueryParam "alt" Text :> Delete '[JSON] ()
10721167
10731168type OrgunitsAPI =
10741169 OrgunitsInsert :<|> OrgunitsList :<|> OrgunitsPatch
@@ -1078,87 +1173,105 @@ type OrgunitsAPI =
10781173
10791174-- | Add Organization Unit
10801175type OrgunitsInsert =
1081− "admin" :> "directory" :> "v1" :> "customer" :>
1082− Capture "customerId" Text
1083− :> "orgunits"
1084− :> QueryParam "quotaUser" Text
1085− :> QueryParam "prettyPrint" Bool
1086− :> QueryParam "userIp" Text
1087− :> QueryParam "key" Text
1088− :> QueryParam "oauth_token" Text
1089− :> QueryParam "fields" Text
1090− :> QueryParam "alt" Text
1176+ "admin" :>
1177+ "directory" :>
1178+ "v1" :>
1179+ "customer" :>
1180+ Capture "customerId" Text :>
1181+ "orgunits" :>
1182+ QueryParam "quotaUser" Text :>
1183+ QueryParam "prettyPrint" Bool :>
1184+ QueryParam "userIp" Text :>
1185+ QueryParam "key" Text :>
1186+ QueryParam "oauth_token" Text :>
1187+ QueryParam "fields" Text :>
1188+ QueryParam "alt" Text :> Post '[JSON] OrgUnit
10911189
10921190-- | Retrieve all Organization Units
10931191type OrgunitsList =
1094− "admin" :> "directory" :> "v1" :> "customer" :>
1095− Capture "customerId" Text
1096− :> "orgunits"
1097− :> QueryParam "quotaUser" Text
1098− :> QueryParam "prettyPrint" Bool
1099− :> QueryParam "userIp" Text
1100− :> QueryParam "orgUnitPath" Text
1101− :> QueryParam "key" Text
1102− :> QueryParam "type" Text
1103− :> QueryParam "oauth_token" Text
1104− :> QueryParam "fields" Text
1105− :> QueryParam "alt" Text
1192+ "admin" :>
1193+ "directory" :>
1194+ "v1" :>
1195+ "customer" :>
1196+ Capture "customerId" Text :>
1197+ "orgunits" :>
1198+ QueryParam "quotaUser" Text :>
1199+ QueryParam "prettyPrint" Bool :>
1200+ QueryParam "userIp" Text :>
1201+ QueryParam "orgUnitPath" Text :>
1202+ QueryParam "key" Text :>
1203+ QueryParam "type" Text :>
1204+ QueryParam "oauth_token" Text :>
1205+ QueryParam "fields" Text :>
1206+ QueryParam "alt" Text :> Get '[JSON] OrgUnits
11061207
11071208-- | Update Organization Unit. This method supports patch semantics.
11081209type OrgunitsPatch =
1109− "admin" :> "directory" :> "v1" :> "customer" :>
1110− Capture "customerId" Text
1111− :> "orgunits{"
1112− :> "orgUnitPath*}"
1113− :> QueryParam "quotaUser" Text
1114− :> QueryParam "prettyPrint" Bool
1115− :> QueryParam "userIp" Text
1116− :> QueryParam "key" Text
1117− :> QueryParam "oauth_token" Text
1118− :> QueryParam "fields" Text
1119− :> QueryParam "alt" Text
1210+ "admin" :>
1211+ "directory" :>
1212+ "v1" :>
1213+ "customer" :>
1214+ Capture "customerId" Text :>
1215+ "orgunits{" :>
1216+ "orgUnitPath*}" :>
1217+ QueryParam "quotaUser" Text :>
1218+ QueryParam "prettyPrint" Bool :>
1219+ QueryParam "userIp" Text :>
1220+ QueryParam "key" Text :>
1221+ QueryParam "oauth_token" Text :>
1222+ QueryParam "fields" Text :>
1223+ QueryParam "alt" Text :> Patch '[JSON] OrgUnit
11201224
11211225-- | Retrieve Organization Unit
11221226type OrgunitsGet =
1123− "admin" :> "directory" :> "v1" :> "customer" :>
1124− Capture "customerId" Text
1125− :> "orgunits{"
1126− :> "orgUnitPath*}"
1127− :> QueryParam "quotaUser" Text
1128− :> QueryParam "prettyPrint" Bool
1129− :> QueryParam "userIp" Text
1130− :> QueryParam "key" Text
1131− :> QueryParam "oauth_token" Text
1132− :> QueryParam "fields" Text
1133− :> QueryParam "alt" Text
1227+ "admin" :>
1228+ "directory" :>
1229+ "v1" :>
1230+ "customer" :>
1231+ Capture "customerId" Text :>
1232+ "orgunits{" :>
1233+ "orgUnitPath*}" :>
1234+ QueryParam "quotaUser" Text :>
1235+ QueryParam "prettyPrint" Bool :>
1236+ QueryParam "userIp" Text :>
1237+ QueryParam "key" Text :>
1238+ QueryParam "oauth_token" Text :>
1239+ QueryParam "fields" Text :>
1240+ QueryParam "alt" Text :> Get '[JSON] OrgUnit
11341241
11351242-- | Remove Organization Unit
11361243type OrgunitsDelete =
1137− "admin" :> "directory" :> "v1" :> "customer" :>
1138− Capture "customerId" Text
1139− :> "orgunits{"
1140− :> "orgUnitPath*}"
1141− :> QueryParam "quotaUser" Text
1142− :> QueryParam "prettyPrint" Bool
1143− :> QueryParam "userIp" Text
1144− :> QueryParam "key" Text
1145− :> QueryParam "oauth_token" Text
1146− :> QueryParam "fields" Text
1147− :> QueryParam "alt" Text
1244+ "admin" :>
1245+ "directory" :>
1246+ "v1" :>
1247+ "customer" :>
1248+ Capture "customerId" Text :>
1249+ "orgunits{" :>
1250+ "orgUnitPath*}" :>
1251+ QueryParam "quotaUser" Text :>
1252+ QueryParam "prettyPrint" Bool :>
1253+ QueryParam "userIp" Text :>
1254+ QueryParam "key" Text :>
1255+ QueryParam "oauth_token" Text :>
1256+ QueryParam "fields" Text :>
1257+ QueryParam "alt" Text :> Delete '[JSON] ()
11481258
11491259-- | Update Organization Unit
11501260type OrgunitsUpdate =
1151− "admin" :> "directory" :> "v1" :> "customer" :>
1152− Capture "customerId" Text
1153− :> "orgunits{"
1154− :> "orgUnitPath*}"
1155− :> QueryParam "quotaUser" Text
1156− :> QueryParam "prettyPrint" Bool
1157− :> QueryParam "userIp" Text
1158− :> QueryParam "key" Text
1159− :> QueryParam "oauth_token" Text
1160− :> QueryParam "fields" Text
1161− :> QueryParam "alt" Text
1261+ "admin" :>
1262+ "directory" :>
1263+ "v1" :>
1264+ "customer" :>
1265+ Capture "customerId" Text :>
1266+ "orgunits{" :>
1267+ "orgUnitPath*}" :>
1268+ QueryParam "quotaUser" Text :>
1269+ QueryParam "prettyPrint" Bool :>
1270+ QueryParam "userIp" Text :>
1271+ QueryParam "key" Text :>
1272+ QueryParam "oauth_token" Text :>
1273+ QueryParam "fields" Text :>
1274+ QueryParam "alt" Text :> Put '[JSON] OrgUnit
11621275
11631276type VerificationCodesAPI =
11641277 VerificationCodesList :<|> VerificationCodesGenerate
@@ -1167,44 +1280,54 @@ type VerificationCodesAPI =
11671280-- | Returns the current set of valid backup verification codes for the
11681281-- specified user.
11691282type VerificationCodesList =
1170− "admin" :> "directory" :> "v1" :> "users" :>
1171− Capture "userKey" Text
1172− :> "verificationCodes"
1173− :> QueryParam "quotaUser" Text
1174− :> QueryParam "prettyPrint" Bool
1175− :> QueryParam "userIp" Text
1176− :> QueryParam "key" Text
1177− :> QueryParam "oauth_token" Text
1178− :> QueryParam "fields" Text
1179− :> QueryParam "alt" Text
1283+ "admin" :>
1284+ "directory" :>
1285+ "v1" :>
1286+ "users" :>
1287+ Capture "userKey" Text :>
1288+ "verificationCodes" :>
1289+ QueryParam "quotaUser" Text :>
1290+ QueryParam "prettyPrint" Bool :>
1291+ QueryParam "userIp" Text :>
1292+ QueryParam "key" Text :>
1293+ QueryParam "oauth_token" Text :>
1294+ QueryParam "fields" Text :>
1295+ QueryParam "alt" Text :>
1296+ Get '[JSON] VerificationCodes
11801297
11811298-- | Generate new backup verification codes for the user.
11821299type VerificationCodesGenerate =
1183− "admin" :> "directory" :> "v1" :> "users" :>
1184− Capture "userKey" Text
1185− :> "verificationCodes"
1186− :> "generate"
1187− :> QueryParam "quotaUser" Text
1188− :> QueryParam "prettyPrint" Bool
1189− :> QueryParam "userIp" Text
1190− :> QueryParam "key" Text
1191− :> QueryParam "oauth_token" Text
1192− :> QueryParam "fields" Text
1193− :> QueryParam "alt" Text
1300+ "admin" :>
1301+ "directory" :>
1302+ "v1" :>
1303+ "users" :>
1304+ Capture "userKey" Text :>
1305+ "verificationCodes" :>
1306+ "generate" :>
1307+ QueryParam "quotaUser" Text :>
1308+ QueryParam "prettyPrint" Bool :>
1309+ QueryParam "userIp" Text :>
1310+ QueryParam "key" Text :>
1311+ QueryParam "oauth_token" Text :>
1312+ QueryParam "fields" Text :>
1313+ QueryParam "alt" Text :> Post '[JSON] ()
11941314
11951315-- | Invalidate the current backup verification codes for the user.
11961316type VerificationCodesInvalidate =
1197− "admin" :> "directory" :> "v1" :> "users" :>
1198− Capture "userKey" Text
1199− :> "verificationCodes"
1200− :> "invalidate"
1201− :> QueryParam "quotaUser" Text
1202− :> QueryParam "prettyPrint" Bool
1203− :> QueryParam "userIp" Text
1204− :> QueryParam "key" Text
1205− :> QueryParam "oauth_token" Text
1206− :> QueryParam "fields" Text
1207− :> QueryParam "alt" Text
1317+ "admin" :>
1318+ "directory" :>
1319+ "v1" :>
1320+ "users" :>
1321+ Capture "userKey" Text :>
1322+ "verificationCodes" :>
1323+ "invalidate" :>
1324+ QueryParam "quotaUser" Text :>
1325+ QueryParam "prettyPrint" Bool :>
1326+ QueryParam "userIp" Text :>
1327+ QueryParam "key" Text :>
1328+ QueryParam "oauth_token" Text :>
1329+ QueryParam "fields" Text :>
1330+ QueryParam "alt" Text :> Post '[JSON] ()
12081331
12091332type NotificationsAPI =
12101333 NotificationsList :<|> NotificationsPatch :<|>
@@ -1214,75 +1337,92 @@ type NotificationsAPI =
12141337
12151338-- | Retrieves a list of notifications.
12161339type NotificationsList =
1217− "admin" :> "directory" :> "v1" :> "customer" :>
1218− Capture "customer" Text
1219− :> "notifications"
1220− :> QueryParam "quotaUser" Text
1221− :> QueryParam "prettyPrint" Bool
1222− :> QueryParam "userIp" Text
1223− :> QueryParam "key" Text
1224− :> QueryParam "language" Text
1225− :> QueryParam "pageToken" Text
1226− :> QueryParam "oauth_token" Text
1227− :> QueryParam "maxResults" Word32
1228− :> QueryParam "fields" Text
1229− :> QueryParam "alt" Text
1340+ "admin" :>
1341+ "directory" :>
1342+ "v1" :>
1343+ "customer" :>
1344+ Capture "customer" Text :>
1345+ "notifications" :>
1346+ QueryParam "quotaUser" Text :>
1347+ QueryParam "prettyPrint" Bool :>
1348+ QueryParam "userIp" Text :>
1349+ QueryParam "key" Text :>
1350+ QueryParam "language" Text :>
1351+ QueryParam "pageToken" Text :>
1352+ QueryParam "oauth_token" Text :>
1353+ QueryParam "maxResults" Word32 :>
1354+ QueryParam "fields" Text :>
1355+ QueryParam "alt" Text :>
1356+ Get '[JSON] Notifications
12301357
12311358-- | Updates a notification. This method supports patch semantics.
12321359type NotificationsPatch =
1233− "admin" :> "directory" :> "v1" :> "customer" :>
1234− Capture "customer" Text
1235− :> "notifications"
1236− :> Capture "notificationId" Text
1237− :> QueryParam "quotaUser" Text
1238− :> QueryParam "prettyPrint" Bool
1239− :> QueryParam "userIp" Text
1240− :> QueryParam "key" Text
1241− :> QueryParam "oauth_token" Text
1242− :> QueryParam "fields" Text
1243− :> QueryParam "alt" Text
1360+ "admin" :>
1361+ "directory" :>
1362+ "v1" :>
1363+ "customer" :>
1364+ Capture "customer" Text :>
1365+ "notifications" :>
1366+ Capture "notificationId" Text :>
1367+ QueryParam "quotaUser" Text :>
1368+ QueryParam "prettyPrint" Bool :>
1369+ QueryParam "userIp" Text :>
1370+ QueryParam "key" Text :>
1371+ QueryParam "oauth_token" Text :>
1372+ QueryParam "fields" Text :>
1373+ QueryParam "alt" Text :>
1374+ Patch '[JSON] Notification
12441375
12451376-- | Retrieves a notification.
12461377type NotificationsGet =
1247− "admin" :> "directory" :> "v1" :> "customer" :>
1248− Capture "customer" Text
1249− :> "notifications"
1250− :> Capture "notificationId" Text
1251− :> QueryParam "quotaUser" Text
1252− :> QueryParam "prettyPrint" Bool
1253− :> QueryParam "userIp" Text
1254− :> QueryParam "key" Text
1255− :> QueryParam "oauth_token" Text
1256− :> QueryParam "fields" Text
1257− :> QueryParam "alt" Text
1378+ "admin" :>
1379+ "directory" :>
1380+ "v1" :>
1381+ "customer" :>
1382+ Capture "customer" Text :>
1383+ "notifications" :>
1384+ Capture "notificationId" Text :>
1385+ QueryParam "quotaUser" Text :>
1386+ QueryParam "prettyPrint" Bool :>
1387+ QueryParam "userIp" Text :>
1388+ QueryParam "key" Text :>
1389+ QueryParam "oauth_token" Text :>
1390+ QueryParam "fields" Text :>
1391+ QueryParam "alt" Text :> Get '[JSON] Notification
12581392
12591393-- | Deletes a notification
12601394type NotificationsDelete =
1261− "admin" :> "directory" :> "v1" :> "customer" :>
1262− Capture "customer" Text
1263− :> "notifications"
1264− :> Capture "notificationId" Text
1265− :> QueryParam "quotaUser" Text
1266− :> QueryParam "prettyPrint" Bool
1267− :> QueryParam "userIp" Text
1268− :> QueryParam "key" Text
1269− :> QueryParam "oauth_token" Text
1270− :> QueryParam "fields" Text
1271− :> QueryParam "alt" Text
1395+ "admin" :>
1396+ "directory" :>
1397+ "v1" :>
1398+ "customer" :>
1399+ Capture "customer" Text :>
1400+ "notifications" :>
1401+ Capture "notificationId" Text :>
1402+ QueryParam "quotaUser" Text :>
1403+ QueryParam "prettyPrint" Bool :>
1404+ QueryParam "userIp" Text :>
1405+ QueryParam "key" Text :>
1406+ QueryParam "oauth_token" Text :>
1407+ QueryParam "fields" Text :>
1408+ QueryParam "alt" Text :> Delete '[JSON] ()
12721409
12731410-- | Updates a notification.
12741411type NotificationsUpdate =
1275− "admin" :> "directory" :> "v1" :> "customer" :>
1276− Capture "customer" Text
1277− :> "notifications"
1278− :> Capture "notificationId" Text
1279− :> QueryParam "quotaUser" Text
1280− :> QueryParam "prettyPrint" Bool
1281− :> QueryParam "userIp" Text
1282− :> QueryParam "key" Text
1283− :> QueryParam "oauth_token" Text
1284− :> QueryParam "fields" Text
1285− :> QueryParam "alt" Text
1412+ "admin" :>
1413+ "directory" :>
1414+ "v1" :>
1415+ "customer" :>
1416+ Capture "customer" Text :>
1417+ "notifications" :>
1418+ Capture "notificationId" Text :>
1419+ QueryParam "quotaUser" Text :>
1420+ QueryParam "prettyPrint" Bool :>
1421+ QueryParam "userIp" Text :>
1422+ QueryParam "key" Text :>
1423+ QueryParam "oauth_token" Text :>
1424+ QueryParam "fields" Text :>
1425+ QueryParam "alt" Text :> Put '[JSON] Notification
12861426
12871427type ChromeosdevicesAPI =
12881428 ChromeosdevicesList :<|> ChromeosdevicesPatch :<|>
@@ -1291,111 +1431,136 @@ type ChromeosdevicesAPI =
12911431
12921432-- | Retrieve all Chrome OS Devices of a customer (paginated)
12931433type ChromeosdevicesList =
1294− "admin" :> "directory" :> "v1" :> "customer" :>
1295− Capture "customerId" Text
1296− :> "devices"
1297− :> "chromeos"
1298− :> QueryParam "quotaUser" Text
1299− :> QueryParam "prettyPrint" Bool
1300− :> QueryParam "orderBy" Text
1301− :> QueryParam "userIp" Text
1302− :> QueryParam "sortOrder" Text
1303− :> QueryParam "key" Text
1304− :> QueryParam "query" Text
1305− :> QueryParam "projection" Text
1306− :> QueryParam "pageToken" Text
1307− :> QueryParam "oauth_token" Text
1308− :> QueryParam "maxResults" Natural
1309− :> QueryParam "fields" Text
1310− :> QueryParam "alt" Text
1434+ "admin" :>
1435+ "directory" :>
1436+ "v1" :>
1437+ "customer" :>
1438+ Capture "customerId" Text :>
1439+ "devices" :>
1440+ "chromeos" :>
1441+ QueryParam "quotaUser" Text :>
1442+ QueryParam "prettyPrint" Bool :>
1443+ QueryParam "orderBy" Text :>
1444+ QueryParam "userIp" Text :>
1445+ QueryParam "sortOrder" Text :>
1446+ QueryParam "key" Text :>
1447+ QueryParam "query" Text :>
1448+ QueryParam "projection" Text :>
1449+ QueryParam "pageToken" Text :>
1450+ QueryParam "oauth_token" Text :>
1451+ QueryParam "maxResults" Natural :>
1452+ QueryParam "fields" Text :>
1453+ QueryParam "alt" Text :>
1454+ Get '[JSON] ChromeOsDevices
13111455
13121456-- | Update Chrome OS Device. This method supports patch semantics.
13131457type ChromeosdevicesPatch =
1314− "admin" :> "directory" :> "v1" :> "customer" :>
1315− Capture "customerId" Text
1316− :> "devices"
1317− :> "chromeos"
1318− :> Capture "deviceId" Text
1319− :> QueryParam "quotaUser" Text
1320− :> QueryParam "prettyPrint" Bool
1321− :> QueryParam "userIp" Text
1322− :> QueryParam "key" Text
1323− :> QueryParam "projection" Text
1324− :> QueryParam "oauth_token" Text
1325− :> QueryParam "fields" Text
1326− :> QueryParam "alt" Text
1458+ "admin" :>
1459+ "directory" :>
1460+ "v1" :>
1461+ "customer" :>
1462+ Capture "customerId" Text :>
1463+ "devices" :>
1464+ "chromeos" :>
1465+ Capture "deviceId" Text :>
1466+ QueryParam "quotaUser" Text :>
1467+ QueryParam "prettyPrint" Bool :>
1468+ QueryParam "userIp" Text :>
1469+ QueryParam "key" Text :>
1470+ QueryParam "projection" Text :>
1471+ QueryParam "oauth_token" Text :>
1472+ QueryParam "fields" Text :>
1473+ QueryParam "alt" Text :>
1474+ Patch '[JSON] ChromeOsDevice
13271475
13281476-- | Retrieve Chrome OS Device
13291477type ChromeosdevicesGet =
1330− "admin" :> "directory" :> "v1" :> "customer" :>
1331− Capture "customerId" Text
1332− :> "devices"
1333− :> "chromeos"
1334− :> Capture "deviceId" Text
1335− :> QueryParam "quotaUser" Text
1336− :> QueryParam "prettyPrint" Bool
1337− :> QueryParam "userIp" Text
1338− :> QueryParam "key" Text
1339− :> QueryParam "projection" Text
1340− :> QueryParam "oauth_token" Text
1341− :> QueryParam "fields" Text
1342− :> QueryParam "alt" Text
1478+ "admin" :>
1479+ "directory" :>
1480+ "v1" :>
1481+ "customer" :>
1482+ Capture "customerId" Text :>
1483+ "devices" :>
1484+ "chromeos" :>
1485+ Capture "deviceId" Text :>
1486+ QueryParam "quotaUser" Text :>
1487+ QueryParam "prettyPrint" Bool :>
1488+ QueryParam "userIp" Text :>
1489+ QueryParam "key" Text :>
1490+ QueryParam "projection" Text :>
1491+ QueryParam "oauth_token" Text :>
1492+ QueryParam "fields" Text :>
1493+ QueryParam "alt" Text :>
1494+ Get '[JSON] ChromeOsDevice
13431495
13441496-- | Update Chrome OS Device
13451497type ChromeosdevicesUpdate =
1346− "admin" :> "directory" :> "v1" :> "customer" :>
1347− Capture "customerId" Text
1348− :> "devices"
1349− :> "chromeos"
1350− :> Capture "deviceId" Text
1351− :> QueryParam "quotaUser" Text
1352− :> QueryParam "prettyPrint" Bool
1353− :> QueryParam "userIp" Text
1354− :> QueryParam "key" Text
1355− :> QueryParam "projection" Text
1356− :> QueryParam "oauth_token" Text
1357− :> QueryParam "fields" Text
1358− :> QueryParam "alt" Text
1498+ "admin" :>
1499+ "directory" :>
1500+ "v1" :>
1501+ "customer" :>
1502+ Capture "customerId" Text :>
1503+ "devices" :>
1504+ "chromeos" :>
1505+ Capture "deviceId" Text :>
1506+ QueryParam "quotaUser" Text :>
1507+ QueryParam "prettyPrint" Bool :>
1508+ QueryParam "userIp" Text :>
1509+ QueryParam "key" Text :>
1510+ QueryParam "projection" Text :>
1511+ QueryParam "oauth_token" Text :>
1512+ QueryParam "fields" Text :>
1513+ QueryParam "alt" Text :>
1514+ Put '[JSON] ChromeOsDevice
13591515
13601516type AspsAPI = AspsList :<|> AspsGet :<|> AspsDelete
13611517
13621518-- | List the ASPs issued by a user.
13631519type AspsList =
1364− "admin" :> "directory" :> "v1" :> "users" :>
1365− Capture "userKey" Text
1366− :> "asps"
1367− :> QueryParam "quotaUser" Text
1368− :> QueryParam "prettyPrint" Bool
1369− :> QueryParam "userIp" Text
1370− :> QueryParam "key" Text
1371− :> QueryParam "oauth_token" Text
1372− :> QueryParam "fields" Text
1373− :> QueryParam "alt" Text
1520+ "admin" :>
1521+ "directory" :>
1522+ "v1" :>
1523+ "users" :>
1524+ Capture "userKey" Text :>
1525+ "asps" :>
1526+ QueryParam "quotaUser" Text :>
1527+ QueryParam "prettyPrint" Bool :>
1528+ QueryParam "userIp" Text :>
1529+ QueryParam "key" Text :>
1530+ QueryParam "oauth_token" Text :>
1531+ QueryParam "fields" Text :>
1532+ QueryParam "alt" Text :> Get '[JSON] Asps
13741533
13751534-- | Get information about an ASP issued by a user.
13761535type AspsGet =
1377− "admin" :> "directory" :> "v1" :> "users" :>
1378− Capture "userKey" Text
1379− :> "asps"
1380− :> Capture "codeId" Int32
1381− :> QueryParam "quotaUser" Text
1382− :> QueryParam "prettyPrint" Bool
1383− :> QueryParam "userIp" Text
1384− :> QueryParam "key" Text
1385− :> QueryParam "oauth_token" Text
1386− :> QueryParam "fields" Text
1387− :> QueryParam "alt" Text
1536+ "admin" :>
1537+ "directory" :>
1538+ "v1" :>
1539+ "users" :>
1540+ Capture "userKey" Text :>
1541+ "asps" :>
1542+ Capture "codeId" Int32 :>
1543+ QueryParam "quotaUser" Text :>
1544+ QueryParam "prettyPrint" Bool :>
1545+ QueryParam "userIp" Text :>
1546+ QueryParam "key" Text :>
1547+ QueryParam "oauth_token" Text :>
1548+ QueryParam "fields" Text :>
1549+ QueryParam "alt" Text :> Get '[JSON] Asp
13881550
13891551-- | Delete an ASP issued by a user.
13901552type AspsDelete =
1391− "admin" :> "directory" :> "v1" :> "users" :>
1392− Capture "userKey" Text
1393− :> "asps"
1394− :> Capture "codeId" Int32
1395− :> QueryParam "quotaUser" Text
1396− :> QueryParam "prettyPrint" Bool
1397− :> QueryParam "userIp" Text
1398− :> QueryParam "key" Text
1399− :> QueryParam "oauth_token" Text
1400− :> QueryParam "fields" Text
1401− :> QueryParam "alt" Text
1553+ "admin" :>
1554+ "directory" :>
1555+ "v1" :>
1556+ "users" :>
1557+ Capture "userKey" Text :>
1558+ "asps" :>
1559+ Capture "codeId" Int32 :>
1560+ QueryParam "quotaUser" Text :>
1561+ QueryParam "prettyPrint" Bool :>
1562+ QueryParam "userIp" Text :>
1563+ QueryParam "key" Text :>
1564+ QueryParam "oauth_token" Text :>
1565+ QueryParam "fields" Text :>
1566+ QueryParam "alt" Text :> Delete '[JSON] ()
gogol-admin/gen/Network/Google/Admin/Directory/Types/Product.hs+1033
@@ -1,6 +1,7 @@
11{-# LANGUAGE DeriveDataTypeable #-}
22{-# LANGUAGE DeriveGeneric #-}
33{-# LANGUAGE OverloadedStrings #-}
4+{-# LANGUAGE RecordWildCards #-}
45
56{-# OPTIONS_GHC -fno-warn-unused-imports #-}
67
@@ -74,6 +75,25 @@ aPrimaryEmail
7475 = lens _aPrimaryEmail
7576 (\ s a -> s{_aPrimaryEmail = a})
7677
78+instance FromJSON Alias where
79+ parseJSON
80+ = withObject "Alias"
81+ (\ o ->
82+ Alias <$>
83+ (o .:? "etag") <*>
84+ (o .:? "kind" .!= "admin#directory#alias")
85+ <*> (o .:? "alias")
86+ <*> (o .:? "id")
87+ <*> (o .:? "primaryEmail"))
88+
89+instance ToJSON Alias where
90+ toJSON Alias{..}
91+ = object
92+ (catMaybes
93+ [("etag" .=) <$> _aEtag, Just ("kind" .= _aKind),
94+ ("alias" .=) <$> _aAlias, ("id" .=) <$> _aId,
95+ ("primaryEmail" .=) <$> _aPrimaryEmail])
96+
7797-- | JSON response template to list aliases in Directory API.
7898--
7999-- /See:/ 'aliases' smart constructor.
@@ -116,6 +136,22 @@ aliAliases
116136 _Default
117137 . _Coerce
118138
139+instance FromJSON Aliases where
140+ parseJSON
141+ = withObject "Aliases"
142+ (\ o ->
143+ Aliases <$>
144+ (o .:? "etag") <*>
145+ (o .:? "kind" .!= "admin#directory#aliases")
146+ <*> (o .:? "aliases" .!= mempty))
147+
148+instance ToJSON Aliases where
149+ toJSON Aliases{..}
150+ = object
151+ (catMaybes
152+ [("etag" .=) <$> _aliEtag, Just ("kind" .= _aliKind),
153+ ("aliases" .=) <$> _aliAliases])
154+
119155-- | The template that returns individual ASP (Access Code) data.
120156--
121157-- /See:/ 'asp' smart constructor.
@@ -194,6 +230,29 @@ aspUserKey :: Lens' Asp (Maybe Text)
194230aspUserKey
195231 = lens _aspUserKey (\ s a -> s{_aspUserKey = a})
196232
233+instance FromJSON Asp where
234+ parseJSON
235+ = withObject "Asp"
236+ (\ o ->
237+ Asp <$>
238+ (o .:? "creationTime") <*> (o .:? "etag") <*>
239+ (o .:? "codeId")
240+ <*> (o .:? "kind" .!= "admin#directory#asp")
241+ <*> (o .:? "name")
242+ <*> (o .:? "lastTimeUsed")
243+ <*> (o .:? "userKey"))
244+
245+instance ToJSON Asp where
246+ toJSON Asp{..}
247+ = object
248+ (catMaybes
249+ [("creationTime" .=) <$> _aspCreationTime,
250+ ("etag" .=) <$> _aspEtag,
251+ ("codeId" .=) <$> _aspCodeId,
252+ Just ("kind" .= _aspKind), ("name" .=) <$> _aspName,
253+ ("lastTimeUsed" .=) <$> _aspLastTimeUsed,
254+ ("userKey" .=) <$> _aspUserKey])
255+
197256--
198257-- /See:/ 'asps' smart constructor.
199258data Asps = Asps
@@ -234,6 +293,22 @@ aaItems
234293 = lens _aaItems (\ s a -> s{_aaItems = a}) . _Default
235294 . _Coerce
236295
296+instance FromJSON Asps where
297+ parseJSON
298+ = withObject "Asps"
299+ (\ o ->
300+ Asps <$>
301+ (o .:? "etag") <*>
302+ (o .:? "kind" .!= "admin#directory#aspList")
303+ <*> (o .:? "items" .!= mempty))
304+
305+instance ToJSON Asps where
306+ toJSON Asps{..}
307+ = object
308+ (catMaybes
309+ [("etag" .=) <$> _aaEtag, Just ("kind" .= _aaKind),
310+ ("items" .=) <$> _aaItems])
311+
237312-- | An notification channel used to watch for resource changes.
238313--
239314-- /See:/ 'channel' smart constructor.
@@ -342,6 +417,35 @@ chaId = lens _chaId (\ s a -> s{_chaId = a})
342417chaType :: Lens' Channel (Maybe Text)
343418chaType = lens _chaType (\ s a -> s{_chaType = a})
344419
420+instance FromJSON Channel where
421+ parseJSON
422+ = withObject "Channel"
423+ (\ o ->
424+ Channel <$>
425+ (o .:? "resourceUri") <*> (o .:? "resourceId") <*>
426+ (o .:? "kind" .!= "api#channel")
427+ <*> (o .:? "expiration")
428+ <*> (o .:? "token")
429+ <*> (o .:? "address")
430+ <*> (o .:? "payload")
431+ <*> (o .:? "params")
432+ <*> (o .:? "id")
433+ <*> (o .:? "type"))
434+
435+instance ToJSON Channel where
436+ toJSON Channel{..}
437+ = object
438+ (catMaybes
439+ [("resourceUri" .=) <$> _chaResourceUri,
440+ ("resourceId" .=) <$> _chaResourceId,
441+ Just ("kind" .= _chaKind),
442+ ("expiration" .=) <$> _chaExpiration,
443+ ("token" .=) <$> _chaToken,
444+ ("address" .=) <$> _chaAddress,
445+ ("payload" .=) <$> _chaPayload,
446+ ("params" .=) <$> _chaParams, ("id" .=) <$> _chaId,
447+ ("type" .=) <$> _chaType])
448+
345449-- | Additional parameters controlling delivery channel behavior. Optional.
346450--
347451-- /See:/ 'channelParams' smart constructor.
@@ -355,6 +459,14 @@ channelParams
355459 :: ChannelParams
356460channelParams = ChannelParams
357461
462+instance FromJSON ChannelParams where
463+ parseJSON
464+ = withObject "ChannelParams"
465+ (\ o -> pure ChannelParams)
466+
467+instance ToJSON ChannelParams where
468+ toJSON = const (Object mempty)
469+
358470-- | JSON template for Chrome Os Device resource in Directory API.
359471--
360472-- /See:/ 'chromeOsDevice' smart constructor.
@@ -612,6 +724,67 @@ codOsVersion :: Lens' ChromeOsDevice (Maybe Text)
612724codOsVersion
613725 = lens _codOsVersion (\ s a -> s{_codOsVersion = a})
614726
727+instance FromJSON ChromeOsDevice where
728+ parseJSON
729+ = withObject "ChromeOsDevice"
730+ (\ o ->
731+ ChromeOsDevice <$>
732+ (o .:? "status") <*> (o .:? "etag") <*>
733+ (o .:? "annotatedUser")
734+ <*> (o .:? "platformVersion")
735+ <*> (o .:? "lastSync")
736+ <*> (o .:? "activeTimeRanges" .!= mempty)
737+ <*>
738+ (o .:? "kind" .!= "admin#directory#chromeosdevice")
739+ <*> (o .:? "ethernetMacAddress")
740+ <*> (o .:? "lastEnrollmentTime")
741+ <*> (o .:? "annotatedLocation")
742+ <*> (o .:? "macAddress")
743+ <*> (o .:? "orgUnitPath")
744+ <*> (o .:? "recentUsers" .!= mempty)
745+ <*> (o .:? "supportEndDate")
746+ <*> (o .:? "model")
747+ <*> (o .:? "willAutoRenew")
748+ <*> (o .:? "meid")
749+ <*> (o .:? "deviceId")
750+ <*> (o .:? "bootMode")
751+ <*> (o .:? "orderNumber")
752+ <*> (o .:? "annotatedAssetId")
753+ <*> (o .:? "notes")
754+ <*> (o .:? "serialNumber")
755+ <*> (o .:? "firmwareVersion")
756+ <*> (o .:? "osVersion"))
757+
758+instance ToJSON ChromeOsDevice where
759+ toJSON ChromeOsDevice{..}
760+ = object
761+ (catMaybes
762+ [("status" .=) <$> _codStatus,
763+ ("etag" .=) <$> _codEtag,
764+ ("annotatedUser" .=) <$> _codAnnotatedUser,
765+ ("platformVersion" .=) <$> _codPlatformVersion,
766+ ("lastSync" .=) <$> _codLastSync,
767+ ("activeTimeRanges" .=) <$> _codActiveTimeRanges,
768+ Just ("kind" .= _codKind),
769+ ("ethernetMacAddress" .=) <$> _codEthernetMacAddress,
770+ ("lastEnrollmentTime" .=) <$> _codLastEnrollmentTime,
771+ ("annotatedLocation" .=) <$> _codAnnotatedLocation,
772+ ("macAddress" .=) <$> _codMacAddress,
773+ ("orgUnitPath" .=) <$> _codOrgUnitPath,
774+ ("recentUsers" .=) <$> _codRecentUsers,
775+ ("supportEndDate" .=) <$> _codSupportEndDate,
776+ ("model" .=) <$> _codModel,
777+ ("willAutoRenew" .=) <$> _codWillAutoRenew,
778+ ("meid" .=) <$> _codMeid,
779+ ("deviceId" .=) <$> _codDeviceId,
780+ ("bootMode" .=) <$> _codBootMode,
781+ ("orderNumber" .=) <$> _codOrderNumber,
782+ ("annotatedAssetId" .=) <$> _codAnnotatedAssetId,
783+ ("notes" .=) <$> _codNotes,
784+ ("serialNumber" .=) <$> _codSerialNumber,
785+ ("firmwareVersion" .=) <$> _codFirmwareVersion,
786+ ("osVersion" .=) <$> _codOsVersion])
787+
615788--
616789-- /See:/ 'chromeOsDeviceItemActiveTimeRanges' smart constructor.
617790data ChromeOsDeviceItemActiveTimeRanges = ChromeOsDeviceItemActiveTimeRanges
@@ -645,6 +818,22 @@ codiatrActiveTime
645818 = lens _codiatrActiveTime
646819 (\ s a -> s{_codiatrActiveTime = a})
647820
821+instance FromJSON ChromeOsDeviceItemActiveTimeRanges
822+ where
823+ parseJSON
824+ = withObject "ChromeOsDeviceItemActiveTimeRanges"
825+ (\ o ->
826+ ChromeOsDeviceItemActiveTimeRanges <$>
827+ (o .:? "date") <*> (o .:? "activeTime"))
828+
829+instance ToJSON ChromeOsDeviceItemActiveTimeRanges
830+ where
831+ toJSON ChromeOsDeviceItemActiveTimeRanges{..}
832+ = object
833+ (catMaybes
834+ [("date" .=) <$> _codiatrDate,
835+ ("activeTime" .=) <$> _codiatrActiveTime])
836+
648837--
649838-- /See:/ 'chromeOsDeviceItemRecentUsers' smart constructor.
650839data ChromeOsDeviceItemRecentUsers = ChromeOsDeviceItemRecentUsers
@@ -677,6 +866,20 @@ codiruType :: Lens' ChromeOsDeviceItemRecentUsers (Maybe Text)
677866codiruType
678867 = lens _codiruType (\ s a -> s{_codiruType = a})
679868
869+instance FromJSON ChromeOsDeviceItemRecentUsers where
870+ parseJSON
871+ = withObject "ChromeOsDeviceItemRecentUsers"
872+ (\ o ->
873+ ChromeOsDeviceItemRecentUsers <$>
874+ (o .:? "email") <*> (o .:? "type"))
875+
876+instance ToJSON ChromeOsDeviceItemRecentUsers where
877+ toJSON ChromeOsDeviceItemRecentUsers{..}
878+ = object
879+ (catMaybes
880+ [("email" .=) <$> _codiruEmail,
881+ ("type" .=) <$> _codiruType])
882+
680883-- | JSON response template for List Chrome OS Devices operation in Directory
681884-- API.
682885--
@@ -731,6 +934,24 @@ cChromeosdevices
731934 . _Default
732935 . _Coerce
733936
937+instance FromJSON ChromeOsDevices where
938+ parseJSON
939+ = withObject "ChromeOsDevices"
940+ (\ o ->
941+ ChromeOsDevices <$>
942+ (o .:? "etag") <*> (o .:? "nextPageToken") <*>
943+ (o .:? "kind" .!= "admin#directory#chromeosdevices")
944+ <*> (o .:? "chromeosdevices" .!= mempty))
945+
946+instance ToJSON ChromeOsDevices where
947+ toJSON ChromeOsDevices{..}
948+ = object
949+ (catMaybes
950+ [("etag" .=) <$> _cEtag,
951+ ("nextPageToken" .=) <$> _cNextPageToken,
952+ Just ("kind" .= _cKind),
953+ ("chromeosdevices" .=) <$> _cChromeosdevices])
954+
734955-- | JSON template for Group resource in Directory API.
735956--
736957-- /See:/ 'group'' smart constructor.
@@ -839,6 +1060,36 @@ groDescription
8391060 = lens _groDescription
8401061 (\ s a -> s{_groDescription = a})
8411062
1063+instance FromJSON Group where
1064+ parseJSON
1065+ = withObject "Group"
1066+ (\ o ->
1067+ Group <$>
1068+ (o .:? "email") <*> (o .:? "etag") <*>
1069+ (o .:? "directMembersCount")
1070+ <*> (o .:? "kind" .!= "admin#directory#group")
1071+ <*> (o .:? "aliases" .!= mempty)
1072+ <*> (o .:? "nonEditableAliases" .!= mempty)
1073+ <*> (o .:? "name")
1074+ <*> (o .:? "adminCreated")
1075+ <*> (o .:? "id")
1076+ <*> (o .:? "description"))
1077+
1078+instance ToJSON Group where
1079+ toJSON Group{..}
1080+ = object
1081+ (catMaybes
1082+ [("email" .=) <$> _groEmail,
1083+ ("etag" .=) <$> _groEtag,
1084+ ("directMembersCount" .=) <$> _groDirectMembersCount,
1085+ Just ("kind" .= _groKind),
1086+ ("aliases" .=) <$> _groAliases,
1087+ ("nonEditableAliases" .=) <$> _groNonEditableAliases,
1088+ ("name" .=) <$> _groName,
1089+ ("adminCreated" .=) <$> _groAdminCreated,
1090+ ("id" .=) <$> _groId,
1091+ ("description" .=) <$> _groDescription])
1092+
8421093-- | JSON response template for List Groups operation in Directory API.
8431094--
8441095-- /See:/ 'groups' smart constructor.
@@ -890,6 +1141,23 @@ gNextPageToken
8901141gKind :: Lens' Groups Text
8911142gKind = lens _gKind (\ s a -> s{_gKind = a})
8921143
1144+instance FromJSON Groups where
1145+ parseJSON
1146+ = withObject "Groups"
1147+ (\ o ->
1148+ Groups <$>
1149+ (o .:? "groups" .!= mempty) <*> (o .:? "etag") <*>
1150+ (o .:? "nextPageToken")
1151+ <*> (o .:? "kind" .!= "admin#directory#groups"))
1152+
1153+instance ToJSON Groups where
1154+ toJSON Groups{..}
1155+ = object
1156+ (catMaybes
1157+ [("groups" .=) <$> _gGroups, ("etag" .=) <$> _gEtag,
1158+ ("nextPageToken" .=) <$> _gNextPageToken,
1159+ Just ("kind" .= _gKind)])
1160+
8931161-- | JSON template for Member resource in Directory API.
8941162--
8951163-- /See:/ 'member' smart constructor.
@@ -954,6 +1222,25 @@ mId = lens _mId (\ s a -> s{_mId = a})
9541222mType :: Lens' Member (Maybe Text)
9551223mType = lens _mType (\ s a -> s{_mType = a})
9561224
1225+instance FromJSON Member where
1226+ parseJSON
1227+ = withObject "Member"
1228+ (\ o ->
1229+ Member <$>
1230+ (o .:? "email") <*> (o .:? "etag") <*>
1231+ (o .:? "kind" .!= "admin#directory#member")
1232+ <*> (o .:? "role")
1233+ <*> (o .:? "id")
1234+ <*> (o .:? "type"))
1235+
1236+instance ToJSON Member where
1237+ toJSON Member{..}
1238+ = object
1239+ (catMaybes
1240+ [("email" .=) <$> _mEmail, ("etag" .=) <$> _mEtag,
1241+ Just ("kind" .= _mKind), ("role" .=) <$> _mRole,
1242+ ("id" .=) <$> _mId, ("type" .=) <$> _mType])
1243+
9571244-- | JSON response template for List Members operation in Directory API.
9581245--
9591246-- /See:/ 'members' smart constructor.
@@ -1006,6 +1293,24 @@ memMembers
10061293 _Default
10071294 . _Coerce
10081295
1296+instance FromJSON Members where
1297+ parseJSON
1298+ = withObject "Members"
1299+ (\ o ->
1300+ Members <$>
1301+ (o .:? "etag") <*> (o .:? "nextPageToken") <*>
1302+ (o .:? "kind" .!= "admin#directory#members")
1303+ <*> (o .:? "members" .!= mempty))
1304+
1305+instance ToJSON Members where
1306+ toJSON Members{..}
1307+ = object
1308+ (catMaybes
1309+ [("etag" .=) <$> _memEtag,
1310+ ("nextPageToken" .=) <$> _memNextPageToken,
1311+ Just ("kind" .= _memKind),
1312+ ("members" .=) <$> _memMembers])
1313+
10091314-- | JSON template for Mobile Device resource in Directory API.
10101315--
10111316-- /See:/ 'mobileDevice' smart constructor.
@@ -1315,6 +1620,80 @@ mdDefaultLanguage
13151620 = lens _mdDefaultLanguage
13161621 (\ s a -> s{_mdDefaultLanguage = a})
13171622
1623+instance FromJSON MobileDevice where
1624+ parseJSON
1625+ = withObject "MobileDevice"
1626+ (\ o ->
1627+ MobileDevice <$>
1628+ (o .:? "email" .!= mempty) <*> (o .:? "status") <*>
1629+ (o .:? "etag")
1630+ <*> (o .:? "resourceId")
1631+ <*> (o .:? "buildNumber")
1632+ <*> (o .:? "managedAccountIsOnOwnerProfile")
1633+ <*> (o .:? "lastSync")
1634+ <*> (o .:? "otherAccountsInfo" .!= mempty)
1635+ <*> (o .:? "kind" .!= "admin#directory#mobiledevice")
1636+ <*> (o .:? "adbStatus")
1637+ <*> (o .:? "networkOperator")
1638+ <*> (o .:? "kernelVersion")
1639+ <*> (o .:? "os")
1640+ <*> (o .:? "name" .!= mempty)
1641+ <*> (o .:? "model")
1642+ <*> (o .:? "developerOptionsStatus")
1643+ <*> (o .:? "unknownSourcesStatus")
1644+ <*> (o .:? "meid")
1645+ <*> (o .:? "deviceId")
1646+ <*> (o .:? "firstSync")
1647+ <*> (o .:? "userAgent")
1648+ <*> (o .:? "imei")
1649+ <*> (o .:? "type")
1650+ <*> (o .:? "wifiMacAddress")
1651+ <*> (o .:? "serialNumber")
1652+ <*> (o .:? "hardwareId")
1653+ <*> (o .:? "basebandVersion")
1654+ <*> (o .:? "supportsWorkProfile")
1655+ <*> (o .:? "deviceCompromisedStatus")
1656+ <*> (o .:? "applications" .!= mempty)
1657+ <*> (o .:? "defaultLanguage"))
1658+
1659+instance ToJSON MobileDevice where
1660+ toJSON MobileDevice{..}
1661+ = object
1662+ (catMaybes
1663+ [("email" .=) <$> _mdEmail,
1664+ ("status" .=) <$> _mdStatus, ("etag" .=) <$> _mdEtag,
1665+ ("resourceId" .=) <$> _mdResourceId,
1666+ ("buildNumber" .=) <$> _mdBuildNumber,
1667+ ("managedAccountIsOnOwnerProfile" .=) <$>
1668+ _mdManagedAccountIsOnOwnerProfile,
1669+ ("lastSync" .=) <$> _mdLastSync,
1670+ ("otherAccountsInfo" .=) <$> _mdOtherAccountsInfo,
1671+ Just ("kind" .= _mdKind),
1672+ ("adbStatus" .=) <$> _mdAdbStatus,
1673+ ("networkOperator" .=) <$> _mdNetworkOperator,
1674+ ("kernelVersion" .=) <$> _mdKernelVersion,
1675+ ("os" .=) <$> _mdOs, ("name" .=) <$> _mdName,
1676+ ("model" .=) <$> _mdModel,
1677+ ("developerOptionsStatus" .=) <$>
1678+ _mdDeveloperOptionsStatus,
1679+ ("unknownSourcesStatus" .=) <$>
1680+ _mdUnknownSourcesStatus,
1681+ ("meid" .=) <$> _mdMeid,
1682+ ("deviceId" .=) <$> _mdDeviceId,
1683+ ("firstSync" .=) <$> _mdFirstSync,
1684+ ("userAgent" .=) <$> _mdUserAgent,
1685+ ("imei" .=) <$> _mdImei, ("type" .=) <$> _mdType,
1686+ ("wifiMacAddress" .=) <$> _mdWifiMacAddress,
1687+ ("serialNumber" .=) <$> _mdSerialNumber,
1688+ ("hardwareId" .=) <$> _mdHardwareId,
1689+ ("basebandVersion" .=) <$> _mdBasebandVersion,
1690+ ("supportsWorkProfile" .=) <$>
1691+ _mdSupportsWorkProfile,
1692+ ("deviceCompromisedStatus" .=) <$>
1693+ _mdDeviceCompromisedStatus,
1694+ ("applications" .=) <$> _mdApplications,
1695+ ("defaultLanguage" .=) <$> _mdDefaultLanguage])
1696+
13181697-- | JSON request template for firing commands on Mobile Device in Directory
13191698-- Devices API.
13201699--
@@ -1340,6 +1719,15 @@ mdaAction :: Lens' MobileDeviceAction (Maybe Text)
13401719mdaAction
13411720 = lens _mdaAction (\ s a -> s{_mdaAction = a})
13421721
1722+instance FromJSON MobileDeviceAction where
1723+ parseJSON
1724+ = withObject "MobileDeviceAction"
1725+ (\ o -> MobileDeviceAction <$> (o .:? "action"))
1726+
1727+instance ToJSON MobileDeviceAction where
1728+ toJSON MobileDeviceAction{..}
1729+ = object (catMaybes [("action" .=) <$> _mdaAction])
1730+
13431731--
13441732-- /See:/ 'mobileDeviceItemApplications' smart constructor.
13451733data MobileDeviceItemApplications = MobileDeviceItemApplications
@@ -1406,6 +1794,26 @@ mdiaPermission
14061794 . _Default
14071795 . _Coerce
14081796
1797+instance FromJSON MobileDeviceItemApplications where
1798+ parseJSON
1799+ = withObject "MobileDeviceItemApplications"
1800+ (\ o ->
1801+ MobileDeviceItemApplications <$>
1802+ (o .:? "versionCode") <*> (o .:? "versionName") <*>
1803+ (o .:? "packageName")
1804+ <*> (o .:? "displayName")
1805+ <*> (o .:? "permission" .!= mempty))
1806+
1807+instance ToJSON MobileDeviceItemApplications where
1808+ toJSON MobileDeviceItemApplications{..}
1809+ = object
1810+ (catMaybes
1811+ [("versionCode" .=) <$> _mdiaVersionCode,
1812+ ("versionName" .=) <$> _mdiaVersionName,
1813+ ("packageName" .=) <$> _mdiaPackageName,
1814+ ("displayName" .=) <$> _mdiaDisplayName,
1815+ ("permission" .=) <$> _mdiaPermission])
1816+
14091817-- | JSON response template for List Mobile Devices operation in Directory
14101818-- API.
14111819--
@@ -1460,6 +1868,24 @@ mdsMobiledevices
14601868 . _Default
14611869 . _Coerce
14621870
1871+instance FromJSON MobileDevices where
1872+ parseJSON
1873+ = withObject "MobileDevices"
1874+ (\ o ->
1875+ MobileDevices <$>
1876+ (o .:? "etag") <*> (o .:? "nextPageToken") <*>
1877+ (o .:? "kind" .!= "admin#directory#mobiledevices")
1878+ <*> (o .:? "mobiledevices" .!= mempty))
1879+
1880+instance ToJSON MobileDevices where
1881+ toJSON MobileDevices{..}
1882+ = object
1883+ (catMaybes
1884+ [("etag" .=) <$> _mdsEtag,
1885+ ("nextPageToken" .=) <$> _mdsNextPageToken,
1886+ Just ("kind" .= _mdsKind),
1887+ ("mobiledevices" .=) <$> _mdsMobiledevices])
1888+
14631889-- | Template for a notification resource.
14641890--
14651891-- /See:/ 'notification' smart constructor.
@@ -1543,6 +1969,31 @@ nSendTime :: Lens' Notification (Maybe UTCTime)
15431969nSendTime
15441970 = lens _nSendTime (\ s a -> s{_nSendTime = a})
15451971
1972+instance FromJSON Notification where
1973+ parseJSON
1974+ = withObject "Notification"
1975+ (\ o ->
1976+ Notification <$>
1977+ (o .:? "subject") <*> (o .:? "etag") <*>
1978+ (o .:? "kind" .!= "admin#directory#notification")
1979+ <*> (o .:? "body")
1980+ <*> (o .:? "fromAddress")
1981+ <*> (o .:? "isUnread")
1982+ <*> (o .:? "notificationId")
1983+ <*> (o .:? "sendTime"))
1984+
1985+instance ToJSON Notification where
1986+ toJSON Notification{..}
1987+ = object
1988+ (catMaybes
1989+ [("subject" .=) <$> _nSubject,
1990+ ("etag" .=) <$> _nEtag, Just ("kind" .= _nKind),
1991+ ("body" .=) <$> _nBody,
1992+ ("fromAddress" .=) <$> _nFromAddress,
1993+ ("isUnread" .=) <$> _nIsUnread,
1994+ ("notificationId" .=) <$> _nNotificationId,
1995+ ("sendTime" .=) <$> _nSendTime])
1996+
15461997-- | Template for notifications list response.
15471998--
15481999-- /See:/ 'notifications' smart constructor.
@@ -1605,6 +2056,27 @@ notUnreadNotificationsCount
16052056 = lens _notUnreadNotificationsCount
16062057 (\ s a -> s{_notUnreadNotificationsCount = a})
16072058
2059+instance FromJSON Notifications where
2060+ parseJSON
2061+ = withObject "Notifications"
2062+ (\ o ->
2063+ Notifications <$>
2064+ (o .:? "etag") <*> (o .:? "nextPageToken") <*>
2065+ (o .:? "kind" .!= "admin#directory#notifications")
2066+ <*> (o .:? "items" .!= mempty)
2067+ <*> (o .:? "unreadNotificationsCount"))
2068+
2069+instance ToJSON Notifications where
2070+ toJSON Notifications{..}
2071+ = object
2072+ (catMaybes
2073+ [("etag" .=) <$> _notEtag,
2074+ ("nextPageToken" .=) <$> _notNextPageToken,
2075+ Just ("kind" .= _notKind),
2076+ ("items" .=) <$> _notItems,
2077+ ("unreadNotificationsCount" .=) <$>
2078+ _notUnreadNotificationsCount])
2079+
16082080-- | JSON template for Org Unit resource in Directory API.
16092081--
16102082-- /See:/ 'orgUnit' smart constructor.
@@ -1701,6 +2173,34 @@ oOrgUnitId :: Lens' OrgUnit (Maybe Text)
17012173oOrgUnitId
17022174 = lens _oOrgUnitId (\ s a -> s{_oOrgUnitId = a})
17032175
2176+instance FromJSON OrgUnit where
2177+ parseJSON
2178+ = withObject "OrgUnit"
2179+ (\ o ->
2180+ OrgUnit <$>
2181+ (o .:? "etag") <*> (o .:? "parentOrgUnitPath") <*>
2182+ (o .:? "kind" .!= "admin#directory#orgUnit")
2183+ <*> (o .:? "orgUnitPath")
2184+ <*> (o .:? "name")
2185+ <*> (o .:? "blockInheritance")
2186+ <*> (o .:? "parentOrgUnitId")
2187+ <*> (o .:? "description")
2188+ <*> (o .:? "orgUnitId"))
2189+
2190+instance ToJSON OrgUnit where
2191+ toJSON OrgUnit{..}
2192+ = object
2193+ (catMaybes
2194+ [("etag" .=) <$> _oEtag,
2195+ ("parentOrgUnitPath" .=) <$> _oParentOrgUnitPath,
2196+ Just ("kind" .= _oKind),
2197+ ("orgUnitPath" .=) <$> _oOrgUnitPath,
2198+ ("name" .=) <$> _oName,
2199+ ("blockInheritance" .=) <$> _oBlockInheritance,
2200+ ("parentOrgUnitId" .=) <$> _oParentOrgUnitId,
2201+ ("description" .=) <$> _oDescription,
2202+ ("orgUnitId" .=) <$> _oOrgUnitId])
2203+
17042204-- | JSON response template for List Organization Units operation in
17052205-- Directory API.
17062206--
@@ -1745,6 +2245,22 @@ ouOrganizationUnits
17452245 . _Default
17462246 . _Coerce
17472247
2248+instance FromJSON OrgUnits where
2249+ parseJSON
2250+ = withObject "OrgUnits"
2251+ (\ o ->
2252+ OrgUnits <$>
2253+ (o .:? "etag") <*>
2254+ (o .:? "kind" .!= "admin#directory#orgUnits")
2255+ <*> (o .:? "organizationUnits" .!= mempty))
2256+
2257+instance ToJSON OrgUnits where
2258+ toJSON OrgUnits{..}
2259+ = object
2260+ (catMaybes
2261+ [("etag" .=) <$> _ouEtag, Just ("kind" .= _ouKind),
2262+ ("organizationUnits" .=) <$> _ouOrganizationUnits])
2263+
17482264-- | JSON template for Schema resource in Directory API.
17492265--
17502266-- /See:/ 'schema' smart constructor.
@@ -1806,6 +2322,26 @@ schFields
18062322 _Default
18072323 . _Coerce
18082324
2325+instance FromJSON Schema where
2326+ parseJSON
2327+ = withObject "Schema"
2328+ (\ o ->
2329+ Schema <$>
2330+ (o .:? "etag") <*>
2331+ (o .:? "kind" .!= "admin#directory#schema")
2332+ <*> (o .:? "schemaName")
2333+ <*> (o .:? "schemaId")
2334+ <*> (o .:? "fields" .!= mempty))
2335+
2336+instance ToJSON Schema where
2337+ toJSON Schema{..}
2338+ = object
2339+ (catMaybes
2340+ [("etag" .=) <$> _schEtag, Just ("kind" .= _schKind),
2341+ ("schemaName" .=) <$> _schSchemaName,
2342+ ("schemaId" .=) <$> _schSchemaId,
2343+ ("fields" .=) <$> _schFields])
2344+
18092345-- | JSON template for FieldSpec resource for Schemas in Directory API.
18102346--
18112347-- /See:/ 'schemaFieldSpec' smart constructor.
@@ -1906,6 +2442,35 @@ sfsMultiValued
19062442 = lens _sfsMultiValued
19072443 (\ s a -> s{_sfsMultiValued = a})
19082444
2445+instance FromJSON SchemaFieldSpec where
2446+ parseJSON
2447+ = withObject "SchemaFieldSpec"
2448+ (\ o ->
2449+ SchemaFieldSpec <$>
2450+ (o .:? "etag") <*>
2451+ (o .:? "kind" .!= "admin#directory#schema#fieldspec")
2452+ <*> (o .:? "numericIndexingSpec")
2453+ <*> (o .:? "readAccessType" .!= "ALL_DOMAIN_USERS")
2454+ <*> (o .:? "fieldId")
2455+ <*> (o .:? "indexed" .!= True)
2456+ <*> (o .:? "fieldType")
2457+ <*> (o .:? "fieldName")
2458+ <*> (o .:? "multiValued"))
2459+
2460+instance ToJSON SchemaFieldSpec where
2461+ toJSON SchemaFieldSpec{..}
2462+ = object
2463+ (catMaybes
2464+ [("etag" .=) <$> _sfsEtag, Just ("kind" .= _sfsKind),
2465+ ("numericIndexingSpec" .=) <$>
2466+ _sfsNumericIndexingSpec,
2467+ Just ("readAccessType" .= _sfsReadAccessType),
2468+ ("fieldId" .=) <$> _sfsFieldId,
2469+ Just ("indexed" .= _sfsIndexed),
2470+ ("fieldType" .=) <$> _sfsFieldType,
2471+ ("fieldName" .=) <$> _sfsFieldName,
2472+ ("multiValued" .=) <$> _sfsMultiValued])
2473+
19092474-- | Indexing spec for a numeric field. By default, only exact match queries
19102475-- will be supported for numeric fields. Setting the numericIndexingSpec
19112476-- allows range queries to be supported.
@@ -1947,6 +2512,22 @@ sfsnisMinValue
19472512 = lens _sfsnisMinValue
19482513 (\ s a -> s{_sfsnisMinValue = a})
19492514
2515+instance FromJSON SchemaFieldSpecNumericIndexingSpec
2516+ where
2517+ parseJSON
2518+ = withObject "SchemaFieldSpecNumericIndexingSpec"
2519+ (\ o ->
2520+ SchemaFieldSpecNumericIndexingSpec <$>
2521+ (o .:? "maxValue") <*> (o .:? "minValue"))
2522+
2523+instance ToJSON SchemaFieldSpecNumericIndexingSpec
2524+ where
2525+ toJSON SchemaFieldSpecNumericIndexingSpec{..}
2526+ = object
2527+ (catMaybes
2528+ [("maxValue" .=) <$> _sfsnisMaxValue,
2529+ ("minValue" .=) <$> _sfsnisMinValue])
2530+
19502531-- | JSON response template for List Schema operation in Directory API.
19512532--
19522533-- /See:/ 'schemas' smart constructor.
@@ -1989,6 +2570,22 @@ sSchemas
19892570sKind :: Lens' Schemas Text
19902571sKind = lens _sKind (\ s a -> s{_sKind = a})
19912572
2573+instance FromJSON Schemas where
2574+ parseJSON
2575+ = withObject "Schemas"
2576+ (\ o ->
2577+ Schemas <$>
2578+ (o .:? "etag") <*> (o .:? "schemas" .!= mempty) <*>
2579+ (o .:? "kind" .!= "admin#directory#schemas"))
2580+
2581+instance ToJSON Schemas where
2582+ toJSON Schemas{..}
2583+ = object
2584+ (catMaybes
2585+ [("etag" .=) <$> _sEtag,
2586+ ("schemas" .=) <$> _sSchemas,
2587+ Just ("kind" .= _sKind)])
2588+
19922589-- | JSON template for token resource in Directory API.
19932590--
19942591-- /See:/ 'token' smart constructor.
@@ -2079,6 +2676,32 @@ tokUserKey :: Lens' Token (Maybe Text)
20792676tokUserKey
20802677 = lens _tokUserKey (\ s a -> s{_tokUserKey = a})
20812678
2679+instance FromJSON Token where
2680+ parseJSON
2681+ = withObject "Token"
2682+ (\ o ->
2683+ Token <$>
2684+ (o .:? "clientId") <*> (o .:? "etag") <*>
2685+ (o .:? "displayText")
2686+ <*> (o .:? "kind" .!= "admin#directory#token")
2687+ <*> (o .:? "scopes" .!= mempty)
2688+ <*> (o .:? "nativeApp")
2689+ <*> (o .:? "anonymous")
2690+ <*> (o .:? "userKey"))
2691+
2692+instance ToJSON Token where
2693+ toJSON Token{..}
2694+ = object
2695+ (catMaybes
2696+ [("clientId" .=) <$> _tokClientId,
2697+ ("etag" .=) <$> _tokEtag,
2698+ ("displayText" .=) <$> _tokDisplayText,
2699+ Just ("kind" .= _tokKind),
2700+ ("scopes" .=) <$> _tokScopes,
2701+ ("nativeApp" .=) <$> _tokNativeApp,
2702+ ("anonymous" .=) <$> _tokAnonymous,
2703+ ("userKey" .=) <$> _tokUserKey])
2704+
20822705-- | JSON response template for List tokens operation in Directory API.
20832706--
20842707-- /See:/ 'tokens' smart constructor.
@@ -2120,6 +2743,22 @@ tItems
21202743 = lens _tItems (\ s a -> s{_tItems = a}) . _Default .
21212744 _Coerce
21222745
2746+instance FromJSON Tokens where
2747+ parseJSON
2748+ = withObject "Tokens"
2749+ (\ o ->
2750+ Tokens <$>
2751+ (o .:? "etag") <*>
2752+ (o .:? "kind" .!= "admin#directory#tokenList")
2753+ <*> (o .:? "items" .!= mempty))
2754+
2755+instance ToJSON Tokens where
2756+ toJSON Tokens{..}
2757+ = object
2758+ (catMaybes
2759+ [("etag" .=) <$> _tEtag, Just ("kind" .= _tKind),
2760+ ("items" .=) <$> _tItems])
2761+
21232762-- | JSON template for User object in Directory API.
21242763--
21252764-- /See:/ 'user' smart constructor.
@@ -2458,6 +3097,86 @@ useSuspensionReason
24583097 = lens _useSuspensionReason
24593098 (\ s a -> s{_useSuspensionReason = a})
24603099
3100+instance FromJSON User where
3101+ parseJSON
3102+ = withObject "User"
3103+ (\ o ->
3104+ User <$>
3105+ (o .:? "creationTime") <*> (o .:? "lastLoginTime")
3106+ <*> (o .:? "thumbnailPhotoEtag")
3107+ <*> (o .:? "etag")
3108+ <*> (o .:? "ipWhitelisted")
3109+ <*> (o .:? "relations")
3110+ <*> (o .:? "hashFunction")
3111+ <*> (o .:? "kind" .!= "admin#directory#user")
3112+ <*> (o .:? "changePasswordAtNextLogin")
3113+ <*> (o .:? "websites")
3114+ <*> (o .:? "addresses")
3115+ <*> (o .:? "aliases" .!= mempty)
3116+ <*> (o .:? "thumbnailPhotoUrl")
3117+ <*> (o .:? "externalIds")
3118+ <*> (o .:? "suspended")
3119+ <*> (o .:? "agreedToTerms")
3120+ <*> (o .:? "deletionTime")
3121+ <*> (o .:? "nonEditableAliases" .!= mempty)
3122+ <*> (o .:? "orgUnitPath")
3123+ <*> (o .:? "customerId")
3124+ <*> (o .:? "includeInGlobalAddressList")
3125+ <*> (o .:? "phones")
3126+ <*> (o .:? "name")
3127+ <*> (o .:? "password")
3128+ <*> (o .:? "emails")
3129+ <*> (o .:? "ims")
3130+ <*> (o .:? "isAdmin")
3131+ <*> (o .:? "id")
3132+ <*> (o .:? "organizations")
3133+ <*> (o .:? "primaryEmail")
3134+ <*> (o .:? "notes")
3135+ <*> (o .:? "isDelegatedAdmin")
3136+ <*> (o .:? "isMailboxSetup")
3137+ <*> (o .:? "customSchemas")
3138+ <*> (o .:? "suspensionReason"))
3139+
3140+instance ToJSON User where
3141+ toJSON User{..}
3142+ = object
3143+ (catMaybes
3144+ [("creationTime" .=) <$> _useCreationTime,
3145+ ("lastLoginTime" .=) <$> _useLastLoginTime,
3146+ ("thumbnailPhotoEtag" .=) <$> _useThumbnailPhotoEtag,
3147+ ("etag" .=) <$> _useEtag,
3148+ ("ipWhitelisted" .=) <$> _useIpWhitelisted,
3149+ ("relations" .=) <$> _useRelations,
3150+ ("hashFunction" .=) <$> _useHashFunction,
3151+ Just ("kind" .= _useKind),
3152+ ("changePasswordAtNextLogin" .=) <$>
3153+ _useChangePasswordAtNextLogin,
3154+ ("websites" .=) <$> _useWebsites,
3155+ ("addresses" .=) <$> _useAddresses,
3156+ ("aliases" .=) <$> _useAliases,
3157+ ("thumbnailPhotoUrl" .=) <$> _useThumbnailPhotoUrl,
3158+ ("externalIds" .=) <$> _useExternalIds,
3159+ ("suspended" .=) <$> _useSuspended,
3160+ ("agreedToTerms" .=) <$> _useAgreedToTerms,
3161+ ("deletionTime" .=) <$> _useDeletionTime,
3162+ ("nonEditableAliases" .=) <$> _useNonEditableAliases,
3163+ ("orgUnitPath" .=) <$> _useOrgUnitPath,
3164+ ("customerId" .=) <$> _useCustomerId,
3165+ ("includeInGlobalAddressList" .=) <$>
3166+ _useIncludeInGlobalAddressList,
3167+ ("phones" .=) <$> _usePhones,
3168+ ("name" .=) <$> _useName,
3169+ ("password" .=) <$> _usePassword,
3170+ ("emails" .=) <$> _useEmails, ("ims" .=) <$> _useIms,
3171+ ("isAdmin" .=) <$> _useIsAdmin, ("id" .=) <$> _useId,
3172+ ("organizations" .=) <$> _useOrganizations,
3173+ ("primaryEmail" .=) <$> _usePrimaryEmail,
3174+ ("notes" .=) <$> _useNotes,
3175+ ("isDelegatedAdmin" .=) <$> _useIsDelegatedAdmin,
3176+ ("isMailboxSetup" .=) <$> _useIsMailboxSetup,
3177+ ("customSchemas" .=) <$> _useCustomSchemas,
3178+ ("suspensionReason" .=) <$> _useSuspensionReason])
3179+
24613180-- | JSON template for About (notes) of a user in Directory API.
24623181--
24633182-- /See:/ 'userAbout' smart constructor.
@@ -2493,6 +3212,20 @@ uaContentType
24933212 = lens _uaContentType
24943213 (\ s a -> s{_uaContentType = a})
24953214
3215+instance FromJSON UserAbout where
3216+ parseJSON
3217+ = withObject "UserAbout"
3218+ (\ o ->
3219+ UserAbout <$>
3220+ (o .:? "value") <*> (o .:? "contentType"))
3221+
3222+instance ToJSON UserAbout where
3223+ toJSON UserAbout{..}
3224+ = object
3225+ (catMaybes
3226+ [("value" .=) <$> _uaValue,
3227+ ("contentType" .=) <$> _uaContentType])
3228+
24963229-- | JSON template for address.
24973230--
24983231-- /See:/ 'userAddress' smart constructor.
@@ -2633,6 +3366,41 @@ uaSourceIsStructured
26333366 = lens _uaSourceIsStructured
26343367 (\ s a -> s{_uaSourceIsStructured = a})
26353368
3369+instance FromJSON UserAddress where
3370+ parseJSON
3371+ = withObject "UserAddress"
3372+ (\ o ->
3373+ UserAddress <$>
3374+ (o .:? "streetAddress") <*> (o .:? "poBox") <*>
3375+ (o .:? "country")
3376+ <*> (o .:? "postalCode")
3377+ <*> (o .:? "formatted")
3378+ <*> (o .:? "extendedAddress")
3379+ <*> (o .:? "locality")
3380+ <*> (o .:? "primary")
3381+ <*> (o .:? "countryCode")
3382+ <*> (o .:? "region")
3383+ <*> (o .:? "type")
3384+ <*> (o .:? "customType")
3385+ <*> (o .:? "sourceIsStructured"))
3386+
3387+instance ToJSON UserAddress where
3388+ toJSON UserAddress{..}
3389+ = object
3390+ (catMaybes
3391+ [("streetAddress" .=) <$> _uaStreetAddress,
3392+ ("poBox" .=) <$> _uaPoBox,
3393+ ("country" .=) <$> _uaCountry,
3394+ ("postalCode" .=) <$> _uaPostalCode,
3395+ ("formatted" .=) <$> _uaFormatted,
3396+ ("extendedAddress" .=) <$> _uaExtendedAddress,
3397+ ("locality" .=) <$> _uaLocality,
3398+ ("primary" .=) <$> _uaPrimary,
3399+ ("countryCode" .=) <$> _uaCountryCode,
3400+ ("region" .=) <$> _uaRegion, ("type" .=) <$> _uaType,
3401+ ("customType" .=) <$> _uaCustomType,
3402+ ("sourceIsStructured" .=) <$> _uaSourceIsStructured])
3403+
26363404-- | JSON template for a set of custom properties (i.e. all fields in a
26373405-- particular schema)
26383406--
@@ -2647,6 +3415,14 @@ userCustomProperties
26473415 :: UserCustomProperties
26483416userCustomProperties = UserCustomProperties
26493417
3418+instance FromJSON UserCustomProperties where
3419+ parseJSON
3420+ = withObject "UserCustomProperties"
3421+ (\ o -> pure UserCustomProperties)
3422+
3423+instance ToJSON UserCustomProperties where
3424+ toJSON = const (Object mempty)
3425+
26503426-- | Custom fields of the user.
26513427--
26523428-- /See:/ 'userCustomSchemas' smart constructor.
@@ -2660,6 +3436,14 @@ userCustomSchemas
26603436 :: UserCustomSchemas
26613437userCustomSchemas = UserCustomSchemas
26623438
3439+instance FromJSON UserCustomSchemas where
3440+ parseJSON
3441+ = withObject "UserCustomSchemas"
3442+ (\ o -> pure UserCustomSchemas)
3443+
3444+instance ToJSON UserCustomSchemas where
3445+ toJSON = const (Object mempty)
3446+
26633447-- | JSON template for an email.
26643448--
26653449-- /See:/ 'userEmail' smart constructor.
@@ -2715,6 +3499,24 @@ ueCustomType :: Lens' UserEmail (Maybe Text)
27153499ueCustomType
27163500 = lens _ueCustomType (\ s a -> s{_ueCustomType = a})
27173501
3502+instance FromJSON UserEmail where
3503+ parseJSON
3504+ = withObject "UserEmail"
3505+ (\ o ->
3506+ UserEmail <$>
3507+ (o .:? "address") <*> (o .:? "primary") <*>
3508+ (o .:? "type")
3509+ <*> (o .:? "customType"))
3510+
3511+instance ToJSON UserEmail where
3512+ toJSON UserEmail{..}
3513+ = object
3514+ (catMaybes
3515+ [("address" .=) <$> _ueAddress,
3516+ ("primary" .=) <$> _uePrimary,
3517+ ("type" .=) <$> _ueType,
3518+ ("customType" .=) <$> _ueCustomType])
3519+
27183520-- | JSON template for an externalId entry.
27193521--
27203522-- /See:/ 'userExternalId' smart constructor.
@@ -2756,6 +3558,22 @@ ueiCustomType
27563558 = lens _ueiCustomType
27573559 (\ s a -> s{_ueiCustomType = a})
27583560
3561+instance FromJSON UserExternalId where
3562+ parseJSON
3563+ = withObject "UserExternalId"
3564+ (\ o ->
3565+ UserExternalId <$>
3566+ (o .:? "value") <*> (o .:? "type") <*>
3567+ (o .:? "customType"))
3568+
3569+instance ToJSON UserExternalId where
3570+ toJSON UserExternalId{..}
3571+ = object
3572+ (catMaybes
3573+ [("value" .=) <$> _ueiValue,
3574+ ("type" .=) <$> _ueiType,
3575+ ("customType" .=) <$> _ueiCustomType])
3576+
27593577-- | JSON template for instant messenger of an user.
27603578--
27613579-- /See:/ 'userIm' smart constructor.
@@ -2831,6 +3649,28 @@ uiCustomType :: Lens' UserIm (Maybe Text)
28313649uiCustomType
28323650 = lens _uiCustomType (\ s a -> s{_uiCustomType = a})
28333651
3652+instance FromJSON UserIm where
3653+ parseJSON
3654+ = withObject "UserIm"
3655+ (\ o ->
3656+ UserIm <$>
3657+ (o .:? "im") <*> (o .:? "protocol") <*>
3658+ (o .:? "primary")
3659+ <*> (o .:? "customProtocol")
3660+ <*> (o .:? "type")
3661+ <*> (o .:? "customType"))
3662+
3663+instance ToJSON UserIm where
3664+ toJSON UserIm{..}
3665+ = object
3666+ (catMaybes
3667+ [("im" .=) <$> _uiIm,
3668+ ("protocol" .=) <$> _uiProtocol,
3669+ ("primary" .=) <$> _uiPrimary,
3670+ ("customProtocol" .=) <$> _uiCustomProtocol,
3671+ ("type" .=) <$> _uiType,
3672+ ("customType" .=) <$> _uiCustomType])
3673+
28343674-- | JSON request template for setting\/revoking admin status of a user in
28353675-- Directory API.
28363676--
@@ -2856,6 +3696,15 @@ umaStatus :: Lens' UserMakeAdmin (Maybe Bool)
28563696umaStatus
28573697 = lens _umaStatus (\ s a -> s{_umaStatus = a})
28583698
3699+instance FromJSON UserMakeAdmin where
3700+ parseJSON
3701+ = withObject "UserMakeAdmin"
3702+ (\ o -> UserMakeAdmin <$> (o .:? "status"))
3703+
3704+instance ToJSON UserMakeAdmin where
3705+ toJSON UserMakeAdmin{..}
3706+ = object (catMaybes [("status" .=) <$> _umaStatus])
3707+
28593708-- | JSON template for name of a user in Directory API.
28603709--
28613710-- /See:/ 'userName' smart constructor.
@@ -2898,6 +3747,22 @@ unFamilyName :: Lens' UserName (Maybe Text)
28983747unFamilyName
28993748 = lens _unFamilyName (\ s a -> s{_unFamilyName = a})
29003749
3750+instance FromJSON UserName where
3751+ parseJSON
3752+ = withObject "UserName"
3753+ (\ o ->
3754+ UserName <$>
3755+ (o .:? "givenName") <*> (o .:? "fullName") <*>
3756+ (o .:? "familyName"))
3757+
3758+instance ToJSON UserName where
3759+ toJSON UserName{..}
3760+ = object
3761+ (catMaybes
3762+ [("givenName" .=) <$> _unGivenName,
3763+ ("fullName" .=) <$> _unFullName,
3764+ ("familyName" .=) <$> _unFamilyName])
3765+
29013766-- | JSON template for an organization entry.
29023767--
29033768-- /See:/ 'userOrganization' smart constructor.
@@ -3012,6 +3877,37 @@ uoDescription
30123877 = lens _uoDescription
30133878 (\ s a -> s{_uoDescription = a})
30143879
3880+instance FromJSON UserOrganization where
3881+ parseJSON
3882+ = withObject "UserOrganization"
3883+ (\ o ->
3884+ UserOrganization <$>
3885+ (o .:? "department") <*> (o .:? "location") <*>
3886+ (o .:? "costCenter")
3887+ <*> (o .:? "domain")
3888+ <*> (o .:? "symbol")
3889+ <*> (o .:? "primary")
3890+ <*> (o .:? "name")
3891+ <*> (o .:? "title")
3892+ <*> (o .:? "type")
3893+ <*> (o .:? "customType")
3894+ <*> (o .:? "description"))
3895+
3896+instance ToJSON UserOrganization where
3897+ toJSON UserOrganization{..}
3898+ = object
3899+ (catMaybes
3900+ [("department" .=) <$> _uoDepartment,
3901+ ("location" .=) <$> _uoLocation,
3902+ ("costCenter" .=) <$> _uoCostCenter,
3903+ ("domain" .=) <$> _uoDomain,
3904+ ("symbol" .=) <$> _uoSymbol,
3905+ ("primary" .=) <$> _uoPrimary,
3906+ ("name" .=) <$> _uoName, ("title" .=) <$> _uoTitle,
3907+ ("type" .=) <$> _uoType,
3908+ ("customType" .=) <$> _uoCustomType,
3909+ ("description" .=) <$> _uoDescription])
3910+
30153911-- | JSON template for a phone entry.
30163912--
30173913-- /See:/ 'userPhone' smart constructor.
@@ -3065,6 +3961,24 @@ upCustomType :: Lens' UserPhone (Maybe Text)
30653961upCustomType
30663962 = lens _upCustomType (\ s a -> s{_upCustomType = a})
30673963
3964+instance FromJSON UserPhone where
3965+ parseJSON
3966+ = withObject "UserPhone"
3967+ (\ o ->
3968+ UserPhone <$>
3969+ (o .:? "value") <*> (o .:? "primary") <*>
3970+ (o .:? "type")
3971+ <*> (o .:? "customType"))
3972+
3973+instance ToJSON UserPhone where
3974+ toJSON UserPhone{..}
3975+ = object
3976+ (catMaybes
3977+ [("value" .=) <$> _upValue,
3978+ ("primary" .=) <$> _upPrimary,
3979+ ("type" .=) <$> _upType,
3980+ ("customType" .=) <$> _upCustomType])
3981+
30683982-- | JSON template for Photo object in Directory API.
30693983--
30703984-- /See:/ 'userPhoto' smart constructor.
@@ -3148,6 +4062,29 @@ upPrimaryEmail
31484062 = lens _upPrimaryEmail
31494063 (\ s a -> s{_upPrimaryEmail = a})
31504064
4065+instance FromJSON UserPhoto where
4066+ parseJSON
4067+ = withObject "UserPhoto"
4068+ (\ o ->
4069+ UserPhoto <$>
4070+ (o .:? "photoData") <*> (o .:? "etag") <*>
4071+ (o .:? "height")
4072+ <*> (o .:? "kind" .!= "admin#directory#user#photo")
4073+ <*> (o .:? "width")
4074+ <*> (o .:? "mimeType")
4075+ <*> (o .:? "id")
4076+ <*> (o .:? "primaryEmail"))
4077+
4078+instance ToJSON UserPhoto where
4079+ toJSON UserPhoto{..}
4080+ = object
4081+ (catMaybes
4082+ [("photoData" .=) <$> _upPhotoData,
4083+ ("etag" .=) <$> _upEtag, ("height" .=) <$> _upHeight,
4084+ Just ("kind" .= _upKind), ("width" .=) <$> _upWidth,
4085+ ("mimeType" .=) <$> _upMimeType, ("id" .=) <$> _upId,
4086+ ("primaryEmail" .=) <$> _upPrimaryEmail])
4087+
31514088-- | JSON template for a relation entry.
31524089--
31534090-- /See:/ 'userRelation' smart constructor.
@@ -3189,6 +4126,21 @@ urCustomType :: Lens' UserRelation (Maybe Text)
31894126urCustomType
31904127 = lens _urCustomType (\ s a -> s{_urCustomType = a})
31914128
4129+instance FromJSON UserRelation where
4130+ parseJSON
4131+ = withObject "UserRelation"
4132+ (\ o ->
4133+ UserRelation <$>
4134+ (o .:? "value") <*> (o .:? "type") <*>
4135+ (o .:? "customType"))
4136+
4137+instance ToJSON UserRelation where
4138+ toJSON UserRelation{..}
4139+ = object
4140+ (catMaybes
4141+ [("value" .=) <$> _urValue, ("type" .=) <$> _urType,
4142+ ("customType" .=) <$> _urCustomType])
4143+
31924144-- | JSON request template to undelete a user in Directory API.
31934145--
31944146-- /See:/ 'userUndelete' smart constructor.
@@ -3214,6 +4166,16 @@ uuOrgUnitPath
32144166 = lens _uuOrgUnitPath
32154167 (\ s a -> s{_uuOrgUnitPath = a})
32164168
4169+instance FromJSON UserUndelete where
4170+ parseJSON
4171+ = withObject "UserUndelete"
4172+ (\ o -> UserUndelete <$> (o .:? "orgUnitPath"))
4173+
4174+instance ToJSON UserUndelete where
4175+ toJSON UserUndelete{..}
4176+ = object
4177+ (catMaybes [("orgUnitPath" .=) <$> _uuOrgUnitPath])
4178+
32174179-- | JSON template for a website entry.
32184180--
32194181-- /See:/ 'userWebsite' smart constructor.
@@ -3267,6 +4229,24 @@ uwCustomType :: Lens' UserWebsite (Maybe Text)
32674229uwCustomType
32684230 = lens _uwCustomType (\ s a -> s{_uwCustomType = a})
32694231
4232+instance FromJSON UserWebsite where
4233+ parseJSON
4234+ = withObject "UserWebsite"
4235+ (\ o ->
4236+ UserWebsite <$>
4237+ (o .:? "value") <*> (o .:? "primary") <*>
4238+ (o .:? "type")
4239+ <*> (o .:? "customType"))
4240+
4241+instance ToJSON UserWebsite where
4242+ toJSON UserWebsite{..}
4243+ = object
4244+ (catMaybes
4245+ [("value" .=) <$> _uwValue,
4246+ ("primary" .=) <$> _uwPrimary,
4247+ ("type" .=) <$> _uwType,
4248+ ("customType" .=) <$> _uwCustomType])
4249+
32704250-- | JSON response template for List Users operation in Apps Directory API.
32714251--
32724252-- /See:/ 'users' smart constructor.
@@ -3328,6 +4308,25 @@ uTriggerEvent
33284308 = lens _uTriggerEvent
33294309 (\ s a -> s{_uTriggerEvent = a})
33304310
4311+instance FromJSON Users where
4312+ parseJSON
4313+ = withObject "Users"
4314+ (\ o ->
4315+ Users <$>
4316+ (o .:? "etag") <*> (o .:? "nextPageToken") <*>
4317+ (o .:? "users" .!= mempty)
4318+ <*> (o .:? "kind" .!= "admin#directory#users")
4319+ <*> (o .:? "trigger_event"))
4320+
4321+instance ToJSON Users where
4322+ toJSON Users{..}
4323+ = object
4324+ (catMaybes
4325+ [("etag" .=) <$> _uEtag,
4326+ ("nextPageToken" .=) <$> _uNextPageToken,
4327+ ("users" .=) <$> _uUsers, Just ("kind" .= _uKind),
4328+ ("trigger_event" .=) <$> _uTriggerEvent])
4329+
33314330-- | JSON template for verification codes in Directory API.
33324331--
33334332-- /See:/ 'verificationCode' smart constructor.
@@ -3379,6 +4378,23 @@ vKind = lens _vKind (\ s a -> s{_vKind = a})
33794378vUserId :: Lens' VerificationCode (Maybe Text)
33804379vUserId = lens _vUserId (\ s a -> s{_vUserId = a})
33814380
4381+instance FromJSON VerificationCode where
4382+ parseJSON
4383+ = withObject "VerificationCode"
4384+ (\ o ->
4385+ VerificationCode <$>
4386+ (o .:? "verificationCode") <*> (o .:? "etag") <*>
4387+ (o .:? "kind" .!= "admin#directory#verificationCode")
4388+ <*> (o .:? "userId"))
4389+
4390+instance ToJSON VerificationCode where
4391+ toJSON VerificationCode{..}
4392+ = object
4393+ (catMaybes
4394+ [("verificationCode" .=) <$> _vVerificationCode,
4395+ ("etag" .=) <$> _vEtag, Just ("kind" .= _vKind),
4396+ ("userId" .=) <$> _vUserId])
4397+
33824398-- | JSON response template for List verification codes operation in
33834399-- Directory API.
33844400--
@@ -3421,3 +4437,20 @@ vcItems :: Lens' VerificationCodes [Maybe VerificationCode]
34214437vcItems
34224438 = lens _vcItems (\ s a -> s{_vcItems = a}) . _Default
34234439 . _Coerce
4440+
4441+instance FromJSON VerificationCodes where
4442+ parseJSON
4443+ = withObject "VerificationCodes"
4444+ (\ o ->
4445+ VerificationCodes <$>
4446+ (o .:? "etag") <*>
4447+ (o .:? "kind" .!=
4448+ "admin#directory#verificationCodesList")
4449+ <*> (o .:? "items" .!= mempty))
4450+
4451+instance ToJSON VerificationCodes where
4452+ toJSON VerificationCodes{..}
4453+ = object
4454+ (catMaybes
4455+ [("etag" .=) <$> _vcEtag, Just ("kind" .= _vcKind),
4456+ ("items" .=) <$> _vcItems])
gogol-admin/gen/Network/Google/Admin/EmailMigration.hs+12−9
@@ -51,12 +51,15 @@ type MailAPI = MailInsert
5151
5252-- | Insert Mail into Google\'s Gmail backends
5353type MailInsert =
54− "email" :> "v2" :> "users" :> Capture "userKey" Text
55− :> "mail"
56− :> QueryParam "quotaUser" Text
57− :> QueryParam "prettyPrint" Bool
58− :> QueryParam "userIp" Text
59− :> QueryParam "key" Text
60− :> QueryParam "oauth_token" Text
61− :> QueryParam "fields" Text
62− :> QueryParam "alt" Text
54+ "email" :>
55+ "v2" :>
56+ "users" :>
57+ Capture "userKey" Text :>
58+ "mail" :>
59+ QueryParam "quotaUser" Text :>
60+ QueryParam "prettyPrint" Bool :>
61+ QueryParam "userIp" Text :>
62+ QueryParam "key" Text :>
63+ QueryParam "oauth_token" Text :>
64+ QueryParam "fields" Text :>
65+ QueryParam "alt" Text :> Post '[JSON] ()
gogol-admin/gen/Network/Google/Admin/EmailMigration/Types/Product.hs+29
@@ -1,6 +1,7 @@
11{-# LANGUAGE DeriveDataTypeable #-}
22{-# LANGUAGE DeriveGeneric #-}
33{-# LANGUAGE OverloadedStrings #-}
4+{-# LANGUAGE RecordWildCards #-}
45
56{-# OPTIONS_GHC -fno-warn-unused-imports #-}
67
@@ -112,3 +113,31 @@ miIsTrash
112113-- | Boolean indicating if the mail is in \'sent mails\'
113114miIsSent :: Lens' MailItem (Maybe Bool)
114115miIsSent = lens _miIsSent (\ s a -> s{_miIsSent = a})
116+
117+instance FromJSON MailItem where
118+ parseJSON
119+ = withObject "MailItem"
120+ (\ o ->
121+ MailItem <$>
122+ (o .:? "isDeleted") <*> (o .:? "isDraft") <*>
123+ (o .:? "isStarred")
124+ <*> (o .:? "kind" .!= "mailItem")
125+ <*> (o .:? "isUnread")
126+ <*> (o .:? "labels" .!= mempty)
127+ <*> (o .:? "isInbox")
128+ <*> (o .:? "isTrash")
129+ <*> (o .:? "isSent"))
130+
131+instance ToJSON MailItem where
132+ toJSON MailItem{..}
133+ = object
134+ (catMaybes
135+ [("isDeleted" .=) <$> _miIsDeleted,
136+ ("isDraft" .=) <$> _miIsDraft,
137+ ("isStarred" .=) <$> _miIsStarred,
138+ Just ("kind" .= _miKind),
139+ ("isUnread" .=) <$> _miIsUnread,
140+ ("labels" .=) <$> _miLabels,
141+ ("isInbox" .=) <$> _miIsInbox,
142+ ("isTrash" .=) <$> _miIsTrash,
143+ ("isSent" .=) <$> _miIsSent])
gogol-admin/gen/Network/Google/Admin/Reports.hs+102−78
@@ -172,65 +172,79 @@ type ChannelsAPI = ChannelsStop
172172
173173-- | Stop watching resources through this channel
174174type ChannelsStop =
175− "admin" :> "reports" :> "v1" :> "admin" :>
176− "reports_v1"
177− :> "channels"
178− :> "stop"
179− :> QueryParam "quotaUser" Text
180− :> QueryParam "prettyPrint" Bool
181− :> QueryParam "userIp" Text
182− :> QueryParam "key" Text
183− :> QueryParam "oauth_token" Text
184− :> QueryParam "fields" Text
185− :> QueryParam "alt" Text
175+ "admin" :>
176+ "reports" :>
177+ "v1" :>
178+ "admin" :>
179+ "reports_v1" :>
180+ "channels" :>
181+ "stop" :>
182+ QueryParam "quotaUser" Text :>
183+ QueryParam "prettyPrint" Bool :>
184+ QueryParam "userIp" Text :>
185+ QueryParam "key" Text :>
186+ QueryParam "oauth_token" Text :>
187+ QueryParam "fields" Text :>
188+ QueryParam "alt" Text :> Post '[JSON] ()
186189
187190type ActivitiesAPI =
188191 ActivitiesList :<|> ActivitiesWatch
189192
190193-- | Retrieves a list of activities for a specific customer and application.
191194type ActivitiesList =
192− "admin" :> "reports" :> "v1" :> "activity" :> "users"
193− :> Capture "userKey" Text
194− :> "applications"
195− :> Capture "applicationName" Text
196− :> QueryParam "quotaUser" Text
197− :> QueryParam "prettyPrint" Bool
198− :> QueryParam "startTime" Text
199− :> QueryParam "userIp" Text
200− :> QueryParam "filters" Text
201− :> QueryParam "customerId" Text
202− :> QueryParam "actorIpAddress" Text
203− :> QueryParam "key" Text
204− :> QueryParam "endTime" Text
205− :> QueryParam "pageToken" Text
206− :> QueryParam "oauth_token" Text
207− :> QueryParam "eventName" Text
208− :> QueryParam "maxResults" Natural
209− :> QueryParam "fields" Text
210− :> QueryParam "alt" Text
195+ "admin" :>
196+ "reports" :>
197+ "v1" :>
198+ "activity" :>
199+ "users" :>
200+ Capture "userKey" Text :>
201+ "applications" :>
202+ Capture "applicationName" Text :>
203+ QueryParam "quotaUser" Text :>
204+ QueryParam "prettyPrint" Bool :>
205+ QueryParam "startTime" Text :>
206+ QueryParam "userIp" Text :>
207+ QueryParam "filters" Text :>
208+ QueryParam "customerId" Text :>
209+ QueryParam "actorIpAddress" Text :>
210+ QueryParam "key" Text :>
211+ QueryParam "endTime" Text :>
212+ QueryParam "pageToken" Text :>
213+ QueryParam "oauth_token" Text :>
214+ QueryParam "eventName" Text :>
215+ QueryParam "maxResults" Natural :>
216+ QueryParam "fields" Text :>
217+ QueryParam "alt" Text :>
218+ Get '[JSON] Activities
211219
212220-- | Push changes to activities
213221type ActivitiesWatch =
214− "admin" :> "reports" :> "v1" :> "activity" :> "users"
215− :> Capture "userKey" Text
216− :> "applications"
217− :> Capture "applicationName" Text
218− :> "watch"
219− :> QueryParam "quotaUser" Text
220− :> QueryParam "prettyPrint" Bool
221− :> QueryParam "startTime" Text
222− :> QueryParam "userIp" Text
223− :> QueryParam "filters" Text
224− :> QueryParam "customerId" Text
225− :> QueryParam "actorIpAddress" Text
226− :> QueryParam "key" Text
227− :> QueryParam "endTime" Text
228− :> QueryParam "pageToken" Text
229− :> QueryParam "oauth_token" Text
230− :> QueryParam "eventName" Text
231− :> QueryParam "maxResults" Natural
232− :> QueryParam "fields" Text
233− :> QueryParam "alt" Text
222+ "admin" :>
223+ "reports" :>
224+ "v1" :>
225+ "activity" :>
226+ "users" :>
227+ Capture "userKey" Text :>
228+ "applications" :>
229+ Capture "applicationName" Text :>
230+ "watch" :>
231+ QueryParam "quotaUser" Text :>
232+ QueryParam "prettyPrint" Bool :>
233+ QueryParam "startTime" Text :>
234+ QueryParam "userIp" Text :>
235+ QueryParam "filters" Text :>
236+ QueryParam "customerId" Text :>
237+ QueryParam "actorIpAddress" Text :>
238+ QueryParam "key" Text :>
239+ QueryParam "endTime" Text :>
240+ QueryParam "pageToken" Text :>
241+ QueryParam "oauth_token" Text :>
242+ QueryParam "eventName" Text :>
243+ QueryParam "maxResults" Natural
244+ :>
245+ QueryParam "fields" Text :>
246+ QueryParam "alt" Text :>
247+ Post '[JSON] Channel
234248
235249type CustomerUsageReportsAPI =
236250 CustomerUsageReportsGet
@@ -238,37 +252,47 @@ type CustomerUsageReportsAPI =
238252-- | Retrieves a report which is a collection of properties \/ statistics for
239253-- a specific customer.
240254type CustomerUsageReportsGet =
241− "admin" :> "reports" :> "v1" :> "usage" :> "dates" :>
242− Capture "date" Text
243− :> QueryParam "quotaUser" Text
244− :> QueryParam "prettyPrint" Bool
245− :> QueryParam "userIp" Text
246− :> QueryParam "customerId" Text
247− :> QueryParam "key" Text
248− :> QueryParam "parameters" Text
249− :> QueryParam "pageToken" Text
250− :> QueryParam "oauth_token" Text
251− :> QueryParam "fields" Text
252− :> QueryParam "alt" Text
255+ "admin" :>
256+ "reports" :>
257+ "v1" :>
258+ "usage" :>
259+ "dates" :>
260+ Capture "date" Text :>
261+ QueryParam "quotaUser" Text :>
262+ QueryParam "prettyPrint" Bool :>
263+ QueryParam "userIp" Text :>
264+ QueryParam "customerId" Text :>
265+ QueryParam "key" Text :>
266+ QueryParam "parameters" Text :>
267+ QueryParam "pageToken" Text :>
268+ QueryParam "oauth_token" Text :>
269+ QueryParam "fields" Text :>
270+ QueryParam "alt" Text :>
271+ Get '[JSON] UsageReports
253272
254273type UserUsageReportAPI = UserUsageReportGet
255274
256275-- | Retrieves a report which is a collection of properties \/ statistics for
257276-- a set of users.
258277type UserUsageReportGet =
259− "admin" :> "reports" :> "v1" :> "usage" :> "users" :>
260− Capture "userKey" Text
261− :> "dates"
262− :> Capture "date" Text
263− :> QueryParam "quotaUser" Text
264− :> QueryParam "prettyPrint" Bool
265− :> QueryParam "userIp" Text
266− :> QueryParam "filters" Text
267− :> QueryParam "customerId" Text
268− :> QueryParam "key" Text
269− :> QueryParam "parameters" Text
270− :> QueryParam "pageToken" Text
271− :> QueryParam "oauth_token" Text
272− :> QueryParam "maxResults" Word32
273− :> QueryParam "fields" Text
274− :> QueryParam "alt" Text
278+ "admin" :>
279+ "reports" :>
280+ "v1" :>
281+ "usage" :>
282+ "users" :>
283+ Capture "userKey" Text :>
284+ "dates" :>
285+ Capture "date" Text :>
286+ QueryParam "quotaUser" Text :>
287+ QueryParam "prettyPrint" Bool :>
288+ QueryParam "userIp" Text :>
289+ QueryParam "filters" Text :>
290+ QueryParam "customerId" Text :>
291+ QueryParam "key" Text :>
292+ QueryParam "parameters" Text :>
293+ QueryParam "pageToken" Text :>
294+ QueryParam "oauth_token" Text :>
295+ QueryParam "maxResults" Word32 :>
296+ QueryParam "fields" Text :>
297+ QueryParam "alt" Text :>
298+ Get '[JSON] UsageReports
gogol-admin/gen/Network/Google/Admin/Reports/Types/Product.hs+276
@@ -1,6 +1,7 @@
11{-# LANGUAGE DeriveDataTypeable #-}
22{-# LANGUAGE DeriveGeneric #-}
33{-# LANGUAGE OverloadedStrings #-}
4+{-# LANGUAGE RecordWildCards #-}
45
56{-# OPTIONS_GHC -fno-warn-unused-imports #-}
67
@@ -69,6 +70,24 @@ actItems
6970 _Default
7071 . _Coerce
7172
73+instance FromJSON Activities where
74+ parseJSON
75+ = withObject "Activities"
76+ (\ o ->
77+ Activities <$>
78+ (o .:? "etag") <*> (o .:? "nextPageToken") <*>
79+ (o .:? "kind" .!= "admin#reports#activities")
80+ <*> (o .:? "items" .!= mempty))
81+
82+instance ToJSON Activities where
83+ toJSON Activities{..}
84+ = object
85+ (catMaybes
86+ [("etag" .=) <$> _actEtag,
87+ ("nextPageToken" .=) <$> _actNextPageToken,
88+ Just ("kind" .= _actKind),
89+ ("items" .=) <$> _actItems])
90+
7291-- | JSON template for the activity resource.
7392--
7493-- /See:/ 'activity' smart constructor.
@@ -144,6 +163,28 @@ aEvents
144163aId :: Lens' Activity (Maybe ActivityId)
145164aId = lens _aId (\ s a -> s{_aId = a})
146165
166+instance FromJSON Activity where
167+ parseJSON
168+ = withObject "Activity"
169+ (\ o ->
170+ Activity <$>
171+ (o .:? "etag") <*> (o .:? "ipAddress") <*>
172+ (o .:? "kind" .!= "admin#reports#activity")
173+ <*> (o .:? "actor")
174+ <*> (o .:? "ownerDomain")
175+ <*> (o .:? "events" .!= mempty)
176+ <*> (o .:? "id"))
177+
178+instance ToJSON Activity where
179+ toJSON Activity{..}
180+ = object
181+ (catMaybes
182+ [("etag" .=) <$> _aEtag,
183+ ("ipAddress" .=) <$> _aIpAddress,
184+ Just ("kind" .= _aKind), ("actor" .=) <$> _aActor,
185+ ("ownerDomain" .=) <$> _aOwnerDomain,
186+ ("events" .=) <$> _aEvents, ("id" .=) <$> _aId])
187+
147188-- | User doing the action.
148189--
149190-- /See:/ 'activityActor' smart constructor.
@@ -193,6 +234,24 @@ aaProfileId
193234aaKey :: Lens' ActivityActor (Maybe Text)
194235aaKey = lens _aaKey (\ s a -> s{_aaKey = a})
195236
237+instance FromJSON ActivityActor where
238+ parseJSON
239+ = withObject "ActivityActor"
240+ (\ o ->
241+ ActivityActor <$>
242+ (o .:? "email") <*> (o .:? "callerType") <*>
243+ (o .:? "profileId")
244+ <*> (o .:? "key"))
245+
246+instance ToJSON ActivityActor where
247+ toJSON ActivityActor{..}
248+ = object
249+ (catMaybes
250+ [("email" .=) <$> _aaEmail,
251+ ("callerType" .=) <$> _aaCallerType,
252+ ("profileId" .=) <$> _aaProfileId,
253+ ("key" .=) <$> _aaKey])
254+
196255-- | Unique identifier for each activity record.
197256--
198257-- /See:/ 'activityId' smart constructor.
@@ -245,6 +304,24 @@ aiApplicationName
245304 = lens _aiApplicationName
246305 (\ s a -> s{_aiApplicationName = a})
247306
307+instance FromJSON ActivityId where
308+ parseJSON
309+ = withObject "ActivityId"
310+ (\ o ->
311+ ActivityId <$>
312+ (o .:? "time") <*> (o .:? "uniqueQualifier") <*>
313+ (o .:? "customerId")
314+ <*> (o .:? "applicationName"))
315+
316+instance ToJSON ActivityId where
317+ toJSON ActivityId{..}
318+ = object
319+ (catMaybes
320+ [("time" .=) <$> _aiTime,
321+ ("uniqueQualifier" .=) <$> _aiUniqueQualifier,
322+ ("customerId" .=) <$> _aiCustomerId,
323+ ("applicationName" .=) <$> _aiApplicationName])
324+
248325--
249326-- /See:/ 'activityItemEvents' smart constructor.
250327data ActivityItemEvents = ActivityItemEvents
@@ -287,6 +364,22 @@ aieParameters
287364aieType :: Lens' ActivityItemEvents (Maybe Text)
288365aieType = lens _aieType (\ s a -> s{_aieType = a})
289366
367+instance FromJSON ActivityItemEvents where
368+ parseJSON
369+ = withObject "ActivityItemEvents"
370+ (\ o ->
371+ ActivityItemEvents <$>
372+ (o .:? "name") <*> (o .:? "parameters" .!= mempty)
373+ <*> (o .:? "type"))
374+
375+instance ToJSON ActivityItemEvents where
376+ toJSON ActivityItemEvents{..}
377+ = object
378+ (catMaybes
379+ [("name" .=) <$> _aieName,
380+ ("parameters" .=) <$> _aieParameters,
381+ ("type" .=) <$> _aieType])
382+
290383--
291384-- /See:/ 'activityItemParametersItemEvents' smart constructor.
292385data ActivityItemParametersItemEvents = ActivityItemParametersItemEvents
@@ -363,6 +456,30 @@ aipieMultiValue
363456 . _Default
364457 . _Coerce
365458
459+instance FromJSON ActivityItemParametersItemEvents
460+ where
461+ parseJSON
462+ = withObject "ActivityItemParametersItemEvents"
463+ (\ o ->
464+ ActivityItemParametersItemEvents <$>
465+ (o .:? "boolValue") <*> (o .:? "intValue") <*>
466+ (o .:? "value")
467+ <*> (o .:? "multiIntValue" .!= mempty)
468+ <*> (o .:? "name")
469+ <*> (o .:? "multiValue" .!= mempty))
470+
471+instance ToJSON ActivityItemParametersItemEvents
472+ where
473+ toJSON ActivityItemParametersItemEvents{..}
474+ = object
475+ (catMaybes
476+ [("boolValue" .=) <$> _aipieBoolValue,
477+ ("intValue" .=) <$> _aipieIntValue,
478+ ("value" .=) <$> _aipieValue,
479+ ("multiIntValue" .=) <$> _aipieMultiIntValue,
480+ ("name" .=) <$> _aipieName,
481+ ("multiValue" .=) <$> _aipieMultiValue])
482+
366483-- | An notification channel used to watch for resource changes.
367484--
368485-- /See:/ 'channel' smart constructor.
@@ -465,6 +582,35 @@ cId = lens _cId (\ s a -> s{_cId = a})
465582cType :: Lens' Channel (Maybe Text)
466583cType = lens _cType (\ s a -> s{_cType = a})
467584
585+instance FromJSON Channel where
586+ parseJSON
587+ = withObject "Channel"
588+ (\ o ->
589+ Channel <$>
590+ (o .:? "resourceUri") <*> (o .:? "resourceId") <*>
591+ (o .:? "kind" .!= "api#channel")
592+ <*> (o .:? "expiration")
593+ <*> (o .:? "token")
594+ <*> (o .:? "address")
595+ <*> (o .:? "payload")
596+ <*> (o .:? "params")
597+ <*> (o .:? "id")
598+ <*> (o .:? "type"))
599+
600+instance ToJSON Channel where
601+ toJSON Channel{..}
602+ = object
603+ (catMaybes
604+ [("resourceUri" .=) <$> _cResourceUri,
605+ ("resourceId" .=) <$> _cResourceId,
606+ Just ("kind" .= _cKind),
607+ ("expiration" .=) <$> _cExpiration,
608+ ("token" .=) <$> _cToken,
609+ ("address" .=) <$> _cAddress,
610+ ("payload" .=) <$> _cPayload,
611+ ("params" .=) <$> _cParams, ("id" .=) <$> _cId,
612+ ("type" .=) <$> _cType])
613+
468614-- | Additional parameters controlling delivery channel behavior. Optional.
469615--
470616-- /See:/ 'channelParams' smart constructor.
@@ -478,6 +624,14 @@ channelParams
478624 :: ChannelParams
479625channelParams = ChannelParams
480626
627+instance FromJSON ChannelParams where
628+ parseJSON
629+ = withObject "ChannelParams"
630+ (\ o -> pure ChannelParams)
631+
632+instance ToJSON ChannelParams where
633+ toJSON = const (Object mempty)
634+
481635-- | JSON template for a usage report.
482636--
483637-- /See:/ 'usageReport' smart constructor.
@@ -536,6 +690,26 @@ uParameters
536690uEntity :: Lens' UsageReport (Maybe UsageReportEntity)
537691uEntity = lens _uEntity (\ s a -> s{_uEntity = a})
538692
693+instance FromJSON UsageReport where
694+ parseJSON
695+ = withObject "UsageReport"
696+ (\ o ->
697+ UsageReport <$>
698+ (o .:? "etag") <*>
699+ (o .:? "kind" .!= "admin#reports#usageReport")
700+ <*> (o .:? "date")
701+ <*> (o .:? "parameters" .!= mempty)
702+ <*> (o .:? "entity"))
703+
704+instance ToJSON UsageReport where
705+ toJSON UsageReport{..}
706+ = object
707+ (catMaybes
708+ [("etag" .=) <$> _uEtag, Just ("kind" .= _uKind),
709+ ("date" .=) <$> _uDate,
710+ ("parameters" .=) <$> _uParameters,
711+ ("entity" .=) <$> _uEntity])
712+
539713-- | Information about the type of the item.
540714--
541715-- /See:/ 'usageReportEntity' smart constructor.
@@ -587,6 +761,24 @@ ureUserEmail
587761ureType :: Lens' UsageReportEntity (Maybe Text)
588762ureType = lens _ureType (\ s a -> s{_ureType = a})
589763
764+instance FromJSON UsageReportEntity where
765+ parseJSON
766+ = withObject "UsageReportEntity"
767+ (\ o ->
768+ UsageReportEntity <$>
769+ (o .:? "profileId") <*> (o .:? "customerId") <*>
770+ (o .:? "userEmail")
771+ <*> (o .:? "type"))
772+
773+instance ToJSON UsageReportEntity where
774+ toJSON UsageReportEntity{..}
775+ = object
776+ (catMaybes
777+ [("profileId" .=) <$> _ureProfileId,
778+ ("customerId" .=) <$> _ureCustomerId,
779+ ("userEmail" .=) <$> _ureUserEmail,
780+ ("type" .=) <$> _ureType])
781+
590782--
591783-- /See:/ 'usageReportItemMsgValueItemParameters' smart constructor.
592784data UsageReportItemMsgValueItemParameters =
@@ -599,6 +791,16 @@ usageReportItemMsgValueItemParameters
599791 :: UsageReportItemMsgValueItemParameters
600792usageReportItemMsgValueItemParameters = UsageReportItemMsgValueItemParameters
601793
794+instance FromJSON
795+ UsageReportItemMsgValueItemParameters where
796+ parseJSON
797+ = withObject "UsageReportItemMsgValueItemParameters"
798+ (\ o -> pure UsageReportItemMsgValueItemParameters)
799+
800+instance ToJSON UsageReportItemMsgValueItemParameters
801+ where
802+ toJSON = const (Object mempty)
803+
602804--
603805-- /See:/ 'usageReportItemParameters' smart constructor.
604806data UsageReportItemParameters = UsageReportItemParameters
@@ -671,6 +873,28 @@ uripMsgValue
671873 . _Default
672874 . _Coerce
673875
876+instance FromJSON UsageReportItemParameters where
877+ parseJSON
878+ = withObject "UsageReportItemParameters"
879+ (\ o ->
880+ UsageReportItemParameters <$>
881+ (o .:? "datetimeValue") <*> (o .:? "boolValue") <*>
882+ (o .:? "intValue")
883+ <*> (o .:? "stringValue")
884+ <*> (o .:? "name")
885+ <*> (o .:? "msgValue" .!= mempty))
886+
887+instance ToJSON UsageReportItemParameters where
888+ toJSON UsageReportItemParameters{..}
889+ = object
890+ (catMaybes
891+ [("datetimeValue" .=) <$> _uripDatetimeValue,
892+ ("boolValue" .=) <$> _uripBoolValue,
893+ ("intValue" .=) <$> _uripIntValue,
894+ ("stringValue" .=) <$> _uripStringValue,
895+ ("name" .=) <$> _uripName,
896+ ("msgValue" .=) <$> _uripMsgValue])
897+
674898-- | JSON template for a collection of usage reports.
675899--
676900-- /See:/ 'usageReports' smart constructor.
@@ -735,6 +959,26 @@ urWarnings
735959 _Default
736960 . _Coerce
737961
962+instance FromJSON UsageReports where
963+ parseJSON
964+ = withObject "UsageReports"
965+ (\ o ->
966+ UsageReports <$>
967+ (o .:? "etag") <*> (o .:? "nextPageToken") <*>
968+ (o .:? "usageReports" .!= mempty)
969+ <*> (o .:? "kind" .!= "admin#reports#usageReports")
970+ <*> (o .:? "warnings" .!= mempty))
971+
972+instance ToJSON UsageReports where
973+ toJSON UsageReports{..}
974+ = object
975+ (catMaybes
976+ [("etag" .=) <$> _urEtag,
977+ ("nextPageToken" .=) <$> _urNextPageToken,
978+ ("usageReports" .=) <$> _urUsageReports,
979+ Just ("kind" .= _urKind),
980+ ("warnings" .=) <$> _urWarnings])
981+
738982--
739983-- /See:/ 'usageReportsItemDataItemWarnings' smart constructor.
740984data UsageReportsItemDataItemWarnings = UsageReportsItemDataItemWarnings
@@ -769,6 +1013,22 @@ uridiwKey :: Lens' UsageReportsItemDataItemWarnings (Maybe Text)
7691013uridiwKey
7701014 = lens _uridiwKey (\ s a -> s{_uridiwKey = a})
7711015
1016+instance FromJSON UsageReportsItemDataItemWarnings
1017+ where
1018+ parseJSON
1019+ = withObject "UsageReportsItemDataItemWarnings"
1020+ (\ o ->
1021+ UsageReportsItemDataItemWarnings <$>
1022+ (o .:? "value") <*> (o .:? "key"))
1023+
1024+instance ToJSON UsageReportsItemDataItemWarnings
1025+ where
1026+ toJSON UsageReportsItemDataItemWarnings{..}
1027+ = object
1028+ (catMaybes
1029+ [("value" .=) <$> _uridiwValue,
1030+ ("key" .=) <$> _uridiwKey])
1031+
7721032--
7731033-- /See:/ 'usageReportsItemWarnings' smart constructor.
7741034data UsageReportsItemWarnings = UsageReportsItemWarnings
@@ -810,3 +1070,19 @@ uriwCode = lens _uriwCode (\ s a -> s{_uriwCode = a})
8101070uriwMessage :: Lens' UsageReportsItemWarnings (Maybe Text)
8111071uriwMessage
8121072 = lens _uriwMessage (\ s a -> s{_uriwMessage = a})
1073+
1074+instance FromJSON UsageReportsItemWarnings where
1075+ parseJSON
1076+ = withObject "UsageReportsItemWarnings"
1077+ (\ o ->
1078+ UsageReportsItemWarnings <$>
1079+ (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
1080+ (o .:? "message"))
1081+
1082+instance ToJSON UsageReportsItemWarnings where
1083+ toJSON UsageReportsItemWarnings{..}
1084+ = object
1085+ (catMaybes
1086+ [("data" .=) <$> _uriwData,
1087+ ("code" .=) <$> _uriwCode,
1088+ ("message" .=) <$> _uriwMessage])
gogol-adsense-host/gen/Network/Google/AdSense/Host.hs+348−292
@@ -243,60 +243,70 @@ type AssociationsessionsAPI =
243243-- | Verify an association session after the association callback returns
244244-- from AdSense signup.
245245type AssociationsessionsVerify =
246− "adsensehost" :> "v4.1" :> "associationsessions" :>
247− "verify"
248− :> QueryParam "quotaUser" Text
249− :> QueryParam "prettyPrint" Bool
250− :> QueryParam "userIp" Text
251− :> QueryParam "token" Text
252− :> QueryParam "key" Text
253− :> QueryParam "oauth_token" Text
254− :> QueryParam "fields" Text
255− :> QueryParam "alt" Text
246+ "adsensehost" :>
247+ "v4.1" :>
248+ "associationsessions" :>
249+ "verify" :>
250+ QueryParam "quotaUser" Text :>
251+ QueryParam "prettyPrint" Bool :>
252+ QueryParam "userIp" Text :>
253+ QueryParam "token" Text :>
254+ QueryParam "key" Text :>
255+ QueryParam "oauth_token" Text :>
256+ QueryParam "fields" Text :>
257+ QueryParam "alt" Text :>
258+ Get '[JSON] AssociationSession
256259
257260-- | Create an association session for initiating an association with an
258261-- AdSense user.
259262type AssociationsessionsStart =
260− "adsensehost" :> "v4.1" :> "associationsessions" :>
261− "start"
262− :> QueryParam "quotaUser" Text
263− :> QueryParam "prettyPrint" Bool
264− :> QueryParam "userIp" Text
265− :> QueryParam "websiteLocale" Text
266− :> QueryParam "userLocale" Text
267− :> QueryParam "key" Text
268− :> QueryParam "websiteUrl" Text
269− :> QueryParam "oauth_token" Text
270− :> QueryParam "productCode" Text
271− :> QueryParam "fields" Text
272− :> QueryParam "alt" Text
263+ "adsensehost" :>
264+ "v4.1" :>
265+ "associationsessions" :>
266+ "start" :>
267+ QueryParam "quotaUser" Text :>
268+ QueryParam "prettyPrint" Bool :>
269+ QueryParam "userIp" Text :>
270+ QueryParam "websiteLocale" Text :>
271+ QueryParam "userLocale" Text :>
272+ QueryParam "key" Text :>
273+ QueryParam "websiteUrl" Text :>
274+ QueryParam "oauth_token" Text :>
275+ QueryParam "productCode" Text :>
276+ QueryParam "fields" Text :>
277+ QueryParam "alt" Text :>
278+ Get '[JSON] AssociationSession
273279
274280type AdclientsAPI = AdclientsList :<|> AdclientsGet
275281
276282-- | List all host ad clients in this AdSense account.
277283type AdclientsList =
278− "adsensehost" :> "v4.1" :> "adclients" :>
279− QueryParam "quotaUser" Text
280− :> QueryParam "prettyPrint" Bool
281− :> QueryParam "userIp" Text
282− :> QueryParam "key" Text
283− :> QueryParam "pageToken" Text
284− :> QueryParam "oauth_token" Text
285− :> QueryParam "maxResults" Word32
286− :> QueryParam "fields" Text
287− :> QueryParam "alt" Text
284+ "adsensehost" :>
285+ "v4.1" :>
286+ "adclients" :>
287+ QueryParam "quotaUser" Text :>
288+ QueryParam "prettyPrint" Bool :>
289+ QueryParam "userIp" Text :>
290+ QueryParam "key" Text :>
291+ QueryParam "pageToken" Text :>
292+ QueryParam "oauth_token" Text :>
293+ QueryParam "maxResults" Word32 :>
294+ QueryParam "fields" Text :>
295+ QueryParam "alt" Text :> Get '[JSON] AdClients
288296
289297-- | Get information about one of the ad clients in the Host AdSense account.
290298type AdclientsGet =
291− "adsensehost" :> "v4.1" :> "adclients" :>
292− Capture "adClientId" Text
293− :> QueryParam "quotaUser" Text
294− :> QueryParam "prettyPrint" Bool
295− :> QueryParam "userIp" Text
296− :> QueryParam "key" Text
297− :> QueryParam "oauth_token" Text
298− :> QueryParam "fields" Text
299− :> QueryParam "alt" Text
299+ "adsensehost" :>
300+ "v4.1" :>
301+ "adclients" :>
302+ Capture "adClientId" Text :>
303+ QueryParam "quotaUser" Text :>
304+ QueryParam "prettyPrint" Bool :>
305+ QueryParam "userIp" Text :>
306+ QueryParam "key" Text :>
307+ QueryParam "oauth_token" Text :>
308+ QueryParam "fields" Text :>
309+ QueryParam "alt" Text :> Get '[JSON] AdClient
300310
301311type AccountsAPI =
302312 AdclientsAPI :<|> ReportsAPI :<|> AdunitsAPI
@@ -305,33 +315,37 @@ type AdclientsAPI = AdclientsList :<|> AdclientsGet
305315
306316-- | List all hosted ad clients in the specified hosted account.
307317type AdclientsList =
308− "adsensehost" :> "v4.1" :> "accounts" :>
309− Capture "accountId" Text
310− :> "adclients"
311− :> QueryParam "quotaUser" Text
312− :> QueryParam "prettyPrint" Bool
313− :> QueryParam "userIp" Text
314− :> QueryParam "key" Text
315− :> QueryParam "pageToken" Text
316− :> QueryParam "oauth_token" Text
317− :> QueryParam "maxResults" Word32
318− :> QueryParam "fields" Text
319− :> QueryParam "alt" Text
318+ "adsensehost" :>
319+ "v4.1" :>
320+ "accounts" :>
321+ Capture "accountId" Text :>
322+ "adclients" :>
323+ QueryParam "quotaUser" Text :>
324+ QueryParam "prettyPrint" Bool :>
325+ QueryParam "userIp" Text :>
326+ QueryParam "key" Text :>
327+ QueryParam "pageToken" Text :>
328+ QueryParam "oauth_token" Text :>
329+ QueryParam "maxResults" Word32 :>
330+ QueryParam "fields" Text :>
331+ QueryParam "alt" Text :> Get '[JSON] AdClients
320332
321333-- | Get information about one of the ad clients in the specified
322334-- publisher\'s AdSense account.
323335type AdclientsGet =
324− "adsensehost" :> "v4.1" :> "accounts" :>
325− Capture "accountId" Text
326− :> "adclients"
327− :> Capture "adClientId" Text
328− :> QueryParam "quotaUser" Text
329− :> QueryParam "prettyPrint" Bool
330− :> QueryParam "userIp" Text
331− :> QueryParam "key" Text
332− :> QueryParam "oauth_token" Text
333− :> QueryParam "fields" Text
334− :> QueryParam "alt" Text
336+ "adsensehost" :>
337+ "v4.1" :>
338+ "accounts" :>
339+ Capture "accountId" Text :>
340+ "adclients" :>
341+ Capture "adClientId" Text :>
342+ QueryParam "quotaUser" Text :>
343+ QueryParam "prettyPrint" Bool :>
344+ QueryParam "userIp" Text :>
345+ QueryParam "key" Text :>
346+ QueryParam "oauth_token" Text :>
347+ QueryParam "fields" Text :>
348+ QueryParam "alt" Text :> Get '[JSON] AdClient
335349
336350type ReportsAPI = ReportsGenerate
337351
@@ -339,25 +353,28 @@ type ReportsAPI = ReportsGenerate
339353-- parameters. Returns the result as JSON; to retrieve output in CSV format
340354-- specify \"alt=csv\" as a query parameter.
341355type ReportsGenerate =
342− "adsensehost" :> "v4.1" :> "accounts" :>
343− Capture "accountId" Text
344− :> "reports"
345− :> QueryParam "quotaUser" Text
346− :> QueryParam "prettyPrint" Bool
347− :> QueryParam "userIp" Text
348− :> QueryParam "dimension" Text
349− :> QueryParam "locale" Text
350− :> QueryParam "endDate" Text
351− :> QueryParam "startDate" Text
352− :> QueryParam "metric" Text
353− :> QueryParam "key" Text
354− :> QueryParam "sort" Text
355− :> QueryParam "filter" Text
356− :> QueryParam "oauth_token" Text
357− :> QueryParam "startIndex" Word32
358− :> QueryParam "maxResults" Word32
359− :> QueryParam "fields" Text
360− :> QueryParam "alt" Text
356+ "adsensehost" :>
357+ "v4.1" :>
358+ "accounts" :>
359+ Capture "accountId" Text :>
360+ "reports" :>
361+ QueryParam "quotaUser" Text :>
362+ QueryParam "prettyPrint" Bool :>
363+ QueryParam "userIp" Text :>
364+ QueryParam "dimension" Text :>
365+ QueryParam "locale" Text :>
366+ QueryParam "endDate" Text :>
367+ QueryParam "startDate" Text :>
368+ QueryParam "metric" Text :>
369+ QueryParam "key" Text :>
370+ QueryParam "sort" Text :>
371+ QueryParam "filter" Text :>
372+ QueryParam "oauth_token" Text :>
373+ QueryParam "startIndex" Word32 :>
374+ QueryParam "maxResults" Word32 :>
375+ QueryParam "fields" Text :>
376+ QueryParam "alt" Text :>
377+ Get '[JSON] Report
361378
362379type AdunitsAPI =
363380 AdunitsInsert :<|> AdunitsList :<|> AdunitsPatch :<|>
@@ -369,120 +386,135 @@ type AdunitsAPI =
369386-- | Insert the supplied ad unit into the specified publisher AdSense
370387-- account.
371388type AdunitsInsert =
372− "adsensehost" :> "v4.1" :> "accounts" :>
373− Capture "accountId" Text
374− :> "adclients"
375− :> Capture "adClientId" Text
376− :> "adunits"
377− :> QueryParam "quotaUser" Text
378− :> QueryParam "prettyPrint" Bool
379− :> QueryParam "userIp" Text
380− :> QueryParam "key" Text
381− :> QueryParam "oauth_token" Text
382− :> QueryParam "fields" Text
383− :> QueryParam "alt" Text
389+ "adsensehost" :>
390+ "v4.1" :>
391+ "accounts" :>
392+ Capture "accountId" Text :>
393+ "adclients" :>
394+ Capture "adClientId" Text :>
395+ "adunits" :>
396+ QueryParam "quotaUser" Text :>
397+ QueryParam "prettyPrint" Bool :>
398+ QueryParam "userIp" Text :>
399+ QueryParam "key" Text :>
400+ QueryParam "oauth_token" Text :>
401+ QueryParam "fields" Text :>
402+ QueryParam "alt" Text :> Post '[JSON] AdUnit
384403
385404-- | List all ad units in the specified publisher\'s AdSense account.
386405type AdunitsList =
387− "adsensehost" :> "v4.1" :> "accounts" :>
388− Capture "accountId" Text
389− :> "adclients"
390− :> Capture "adClientId" Text
391− :> "adunits"
392− :> QueryParam "quotaUser" Text
393− :> QueryParam "prettyPrint" Bool
394− :> QueryParam "includeInactive" Bool
395− :> QueryParam "userIp" Text
396− :> QueryParam "key" Text
397− :> QueryParam "pageToken" Text
398− :> QueryParam "oauth_token" Text
399− :> QueryParam "maxResults" Word32
400− :> QueryParam "fields" Text
401− :> QueryParam "alt" Text
406+ "adsensehost" :>
407+ "v4.1" :>
408+ "accounts" :>
409+ Capture "accountId" Text :>
410+ "adclients" :>
411+ Capture "adClientId" Text :>
412+ "adunits" :>
413+ QueryParam "quotaUser" Text :>
414+ QueryParam "prettyPrint" Bool :>
415+ QueryParam "includeInactive" Bool :>
416+ QueryParam "userIp" Text :>
417+ QueryParam "key" Text :>
418+ QueryParam "pageToken" Text :>
419+ QueryParam "oauth_token" Text :>
420+ QueryParam "maxResults" Word32 :>
421+ QueryParam "fields" Text :>
422+ QueryParam "alt" Text :>
423+ Get '[JSON] AdUnits
402424
403425-- | Update the supplied ad unit in the specified publisher AdSense account.
404426-- This method supports patch semantics.
405427type AdunitsPatch =
406− "adsensehost" :> "v4.1" :> "accounts" :>
407− Capture "accountId" Text
408− :> "adclients"
409− :> Capture "adClientId" Text
410− :> "adunits"
411− :> QueryParam "quotaUser" Text
412− :> QueryParam "prettyPrint" Bool
413− :> QueryParam "userIp" Text
414− :> QueryParam "adUnitId" Text
415− :> QueryParam "key" Text
416− :> QueryParam "oauth_token" Text
417− :> QueryParam "fields" Text
418− :> QueryParam "alt" Text
428+ "adsensehost" :>
429+ "v4.1" :>
430+ "accounts" :>
431+ Capture "accountId" Text :>
432+ "adclients" :>
433+ Capture "adClientId" Text :>
434+ "adunits" :>
435+ QueryParam "quotaUser" Text :>
436+ QueryParam "prettyPrint" Bool :>
437+ QueryParam "userIp" Text :>
438+ QueryParam "adUnitId" Text :>
439+ QueryParam "key" Text :>
440+ QueryParam "oauth_token" Text :>
441+ QueryParam "fields" Text :>
442+ QueryParam "alt" Text :> Patch '[JSON] AdUnit
419443
420444-- | Get the specified host ad unit in this AdSense account.
421445type AdunitsGet =
422− "adsensehost" :> "v4.1" :> "accounts" :>
423− Capture "accountId" Text
424− :> "adclients"
425− :> Capture "adClientId" Text
426− :> "adunits"
427− :> Capture "adUnitId" Text
428− :> QueryParam "quotaUser" Text
429− :> QueryParam "prettyPrint" Bool
430− :> QueryParam "userIp" Text
431− :> QueryParam "key" Text
432− :> QueryParam "oauth_token" Text
433− :> QueryParam "fields" Text
434− :> QueryParam "alt" Text
446+ "adsensehost" :>
447+ "v4.1" :>
448+ "accounts" :>
449+ Capture "accountId" Text :>
450+ "adclients" :>
451+ Capture "adClientId" Text :>
452+ "adunits" :>
453+ Capture "adUnitId" Text :>
454+ QueryParam "quotaUser" Text :>
455+ QueryParam "prettyPrint" Bool :>
456+ QueryParam "userIp" Text :>
457+ QueryParam "key" Text :>
458+ QueryParam "oauth_token" Text :>
459+ QueryParam "fields" Text :>
460+ QueryParam "alt" Text :> Get '[JSON] AdUnit
435461
436462-- | Get ad code for the specified ad unit, attaching the specified host
437463-- custom channels.
438464type AdunitsGetAdCode =
439− "adsensehost" :> "v4.1" :> "accounts" :>
440− Capture "accountId" Text
441− :> "adclients"
442− :> Capture "adClientId" Text
443− :> "adunits"
444− :> Capture "adUnitId" Text
445− :> "adcode"
446− :> QueryParam "quotaUser" Text
447− :> QueryParam "prettyPrint" Bool
448− :> QueryParam "userIp" Text
449− :> QueryParam "key" Text
450− :> QueryParam "hostCustomChannelId" Text
451− :> QueryParam "oauth_token" Text
452− :> QueryParam "fields" Text
453− :> QueryParam "alt" Text
465+ "adsensehost" :>
466+ "v4.1" :>
467+ "accounts" :>
468+ Capture "accountId" Text :>
469+ "adclients" :>
470+ Capture "adClientId" Text :>
471+ "adunits" :>
472+ Capture "adUnitId" Text :>
473+ "adcode" :>
474+ QueryParam "quotaUser" Text :>
475+ QueryParam "prettyPrint" Bool :>
476+ QueryParam "userIp" Text :>
477+ QueryParam "key" Text :>
478+ QueryParam "hostCustomChannelId" Text :>
479+ QueryParam "oauth_token" Text :>
480+ QueryParam "fields" Text :>
481+ QueryParam "alt" Text :> Get '[JSON] AdCode
454482
455483-- | Delete the specified ad unit from the specified publisher AdSense
456484-- account.
457485type AdunitsDelete =
458− "adsensehost" :> "v4.1" :> "accounts" :>
459− Capture "accountId" Text
460− :> "adclients"
461− :> Capture "adClientId" Text
462− :> "adunits"
463− :> Capture "adUnitId" Text
464− :> QueryParam "quotaUser" Text
465− :> QueryParam "prettyPrint" Bool
466− :> QueryParam "userIp" Text
467− :> QueryParam "key" Text
468− :> QueryParam "oauth_token" Text
469− :> QueryParam "fields" Text
470− :> QueryParam "alt" Text
486+ "adsensehost" :>
487+ "v4.1" :>
488+ "accounts" :>
489+ Capture "accountId" Text :>
490+ "adclients" :>
491+ Capture "adClientId" Text :>
492+ "adunits" :>
493+ Capture "adUnitId" Text :>
494+ QueryParam "quotaUser" Text :>
495+ QueryParam "prettyPrint" Bool :>
496+ QueryParam "userIp" Text :>
497+ QueryParam "key" Text :>
498+ QueryParam "oauth_token" Text :>
499+ QueryParam "fields" Text :>
500+ QueryParam "alt" Text :> Delete '[JSON] AdUnit
471501
472502-- | Update the supplied ad unit in the specified publisher AdSense account.
473503type AdunitsUpdate =
474− "adsensehost" :> "v4.1" :> "accounts" :>
475− Capture "accountId" Text
476− :> "adclients"
477− :> Capture "adClientId" Text
478− :> "adunits"
479− :> QueryParam "quotaUser" Text
480− :> QueryParam "prettyPrint" Bool
481− :> QueryParam "userIp" Text
482− :> QueryParam "key" Text
483− :> QueryParam "oauth_token" Text
484− :> QueryParam "fields" Text
485− :> QueryParam "alt" Text
504+ "adsensehost" :>
505+ "v4.1" :>
506+ "accounts" :>
507+ Capture "accountId" Text :>
508+ "adclients" :>
509+ Capture "adClientId" Text :>
510+ "adunits" :>
511+ QueryParam "quotaUser" Text :>
512+ QueryParam "prettyPrint" Bool :>
513+ QueryParam "userIp" Text :>
514+ QueryParam "key" Text :>
515+ QueryParam "oauth_token" Text :>
516+ QueryParam "fields" Text :>
517+ QueryParam "alt" Text :> Put '[JSON] AdUnit
486518
487519type ReportsAPI = ReportsGenerate
488520
@@ -490,23 +522,26 @@ type ReportsAPI = ReportsGenerate
490522-- parameters. Returns the result as JSON; to retrieve output in CSV format
491523-- specify \"alt=csv\" as a query parameter.
492524type ReportsGenerate =
493− "adsensehost" :> "v4.1" :> "reports" :>
494− QueryParam "quotaUser" Text
495− :> QueryParam "prettyPrint" Bool
496− :> QueryParam "userIp" Text
497− :> QueryParam "dimension" Text
498− :> QueryParam "locale" Text
499− :> QueryParam "endDate" Text
500− :> QueryParam "startDate" Text
501− :> QueryParam "metric" Text
502− :> QueryParam "key" Text
503− :> QueryParam "sort" Text
504− :> QueryParam "filter" Text
505− :> QueryParam "oauth_token" Text
506− :> QueryParam "startIndex" Word32
507− :> QueryParam "maxResults" Word32
508− :> QueryParam "fields" Text
509− :> QueryParam "alt" Text
525+ "adsensehost" :>
526+ "v4.1" :>
527+ "reports" :>
528+ QueryParam "quotaUser" Text :>
529+ QueryParam "prettyPrint" Bool :>
530+ QueryParam "userIp" Text :>
531+ QueryParam "dimension" Text :>
532+ QueryParam "locale" Text :>
533+ QueryParam "endDate" Text :>
534+ QueryParam "startDate" Text :>
535+ QueryParam "metric" Text :>
536+ QueryParam "key" Text :>
537+ QueryParam "sort" Text :>
538+ QueryParam "filter" Text :>
539+ QueryParam "oauth_token" Text :>
540+ QueryParam "startIndex" Word32 :>
541+ QueryParam "maxResults" Word32 :>
542+ QueryParam "fields" Text :>
543+ QueryParam "alt" Text :>
544+ Get '[JSON] Report
510545
511546type UrlchannelsAPI =
512547 UrlchannelsInsert :<|> UrlchannelsList :<|>
@@ -514,45 +549,51 @@ type UrlchannelsAPI =
514549
515550-- | Add a new URL channel to the host AdSense account.
516551type UrlchannelsInsert =
517− "adsensehost" :> "v4.1" :> "adclients" :>
518− Capture "adClientId" Text
519− :> "urlchannels"
520− :> QueryParam "quotaUser" Text
521− :> QueryParam "prettyPrint" Bool
522− :> QueryParam "userIp" Text
523− :> QueryParam "key" Text
524− :> QueryParam "oauth_token" Text
525− :> QueryParam "fields" Text
526− :> QueryParam "alt" Text
552+ "adsensehost" :>
553+ "v4.1" :>
554+ "adclients" :>
555+ Capture "adClientId" Text :>
556+ "urlchannels" :>
557+ QueryParam "quotaUser" Text :>
558+ QueryParam "prettyPrint" Bool :>
559+ QueryParam "userIp" Text :>
560+ QueryParam "key" Text :>
561+ QueryParam "oauth_token" Text :>
562+ QueryParam "fields" Text :>
563+ QueryParam "alt" Text :> Post '[JSON] UrlChannel
527564
528565-- | List all host URL channels in the host AdSense account.
529566type UrlchannelsList =
530− "adsensehost" :> "v4.1" :> "adclients" :>
531− Capture "adClientId" Text
532− :> "urlchannels"
533− :> QueryParam "quotaUser" Text
534− :> QueryParam "prettyPrint" Bool
535− :> QueryParam "userIp" Text
536− :> QueryParam "key" Text
537− :> QueryParam "pageToken" Text
538− :> QueryParam "oauth_token" Text
539− :> QueryParam "maxResults" Word32
540− :> QueryParam "fields" Text
541− :> QueryParam "alt" Text
567+ "adsensehost" :>
568+ "v4.1" :>
569+ "adclients" :>
570+ Capture "adClientId" Text :>
571+ "urlchannels" :>
572+ QueryParam "quotaUser" Text :>
573+ QueryParam "prettyPrint" Bool :>
574+ QueryParam "userIp" Text :>
575+ QueryParam "key" Text :>
576+ QueryParam "pageToken" Text :>
577+ QueryParam "oauth_token" Text :>
578+ QueryParam "maxResults" Word32 :>
579+ QueryParam "fields" Text :>
580+ QueryParam "alt" Text :> Get '[JSON] UrlChannels
542581
543582-- | Delete a URL channel from the host AdSense account.
544583type UrlchannelsDelete =
545− "adsensehost" :> "v4.1" :> "adclients" :>
546− Capture "adClientId" Text
547− :> "urlchannels"
548− :> Capture "urlChannelId" Text
549− :> QueryParam "quotaUser" Text
550− :> QueryParam "prettyPrint" Bool
551− :> QueryParam "userIp" Text
552− :> QueryParam "key" Text
553− :> QueryParam "oauth_token" Text
554− :> QueryParam "fields" Text
555− :> QueryParam "alt" Text
584+ "adsensehost" :>
585+ "v4.1" :>
586+ "adclients" :>
587+ Capture "adClientId" Text :>
588+ "urlchannels" :>
589+ Capture "urlChannelId" Text :>
590+ QueryParam "quotaUser" Text :>
591+ QueryParam "prettyPrint" Bool :>
592+ QueryParam "userIp" Text :>
593+ QueryParam "key" Text :>
594+ QueryParam "oauth_token" Text :>
595+ QueryParam "fields" Text :>
596+ QueryParam "alt" Text :> Delete '[JSON] UrlChannel
556597
557598type CustomchannelsAPI =
558599 CustomchannelsInsert :<|> CustomchannelsList :<|>
@@ -563,84 +604,99 @@ type CustomchannelsAPI =
563604
564605-- | Add a new custom channel to the host AdSense account.
565606type CustomchannelsInsert =
566− "adsensehost" :> "v4.1" :> "adclients" :>
567− Capture "adClientId" Text
568− :> "customchannels"
569− :> QueryParam "quotaUser" Text
570− :> QueryParam "prettyPrint" Bool
571− :> QueryParam "userIp" Text
572− :> QueryParam "key" Text
573− :> QueryParam "oauth_token" Text
574− :> QueryParam "fields" Text
575− :> QueryParam "alt" Text
607+ "adsensehost" :>
608+ "v4.1" :>
609+ "adclients" :>
610+ Capture "adClientId" Text :>
611+ "customchannels" :>
612+ QueryParam "quotaUser" Text :>
613+ QueryParam "prettyPrint" Bool :>
614+ QueryParam "userIp" Text :>
615+ QueryParam "key" Text :>
616+ QueryParam "oauth_token" Text :>
617+ QueryParam "fields" Text :>
618+ QueryParam "alt" Text :> Post '[JSON] CustomChannel
576619
577620-- | List all host custom channels in this AdSense account.
578621type CustomchannelsList =
579− "adsensehost" :> "v4.1" :> "adclients" :>
580− Capture "adClientId" Text
581− :> "customchannels"
582− :> QueryParam "quotaUser" Text
583− :> QueryParam "prettyPrint" Bool
584− :> QueryParam "userIp" Text
585− :> QueryParam "key" Text
586− :> QueryParam "pageToken" Text
587− :> QueryParam "oauth_token" Text
588− :> QueryParam "maxResults" Word32
589− :> QueryParam "fields" Text
590− :> QueryParam "alt" Text
622+ "adsensehost" :>
623+ "v4.1" :>
624+ "adclients" :>
625+ Capture "adClientId" Text :>
626+ "customchannels" :>
627+ QueryParam "quotaUser" Text :>
628+ QueryParam "prettyPrint" Bool :>
629+ QueryParam "userIp" Text :>
630+ QueryParam "key" Text :>
631+ QueryParam "pageToken" Text :>
632+ QueryParam "oauth_token" Text :>
633+ QueryParam "maxResults" Word32 :>
634+ QueryParam "fields" Text :>
635+ QueryParam "alt" Text :>
636+ Get '[JSON] CustomChannels
591637
592638-- | Update a custom channel in the host AdSense account. This method
593639-- supports patch semantics.
594640type CustomchannelsPatch =
595− "adsensehost" :> "v4.1" :> "adclients" :>
596− Capture "adClientId" Text
597− :> "customchannels"
598− :> QueryParam "quotaUser" Text
599− :> QueryParam "prettyPrint" Bool
600− :> QueryParam "customChannelId" Text
601− :> QueryParam "userIp" Text
602− :> QueryParam "key" Text
603− :> QueryParam "oauth_token" Text
604− :> QueryParam "fields" Text
605− :> QueryParam "alt" Text
641+ "adsensehost" :>
642+ "v4.1" :>
643+ "adclients" :>
644+ Capture "adClientId" Text :>
645+ "customchannels" :>
646+ QueryParam "quotaUser" Text :>
647+ QueryParam "prettyPrint" Bool :>
648+ QueryParam "customChannelId" Text :>
649+ QueryParam "userIp" Text :>
650+ QueryParam "key" Text :>
651+ QueryParam "oauth_token" Text :>
652+ QueryParam "fields" Text :>
653+ QueryParam "alt" Text :>
654+ Patch '[JSON] CustomChannel
606655
607656-- | Get a specific custom channel from the host AdSense account.
608657type CustomchannelsGet =
609− "adsensehost" :> "v4.1" :> "adclients" :>
610− Capture "adClientId" Text
611− :> "customchannels"
612− :> Capture "customChannelId" Text
613− :> QueryParam "quotaUser" Text
614− :> QueryParam "prettyPrint" Bool
615− :> QueryParam "userIp" Text
616− :> QueryParam "key" Text
617− :> QueryParam "oauth_token" Text
618− :> QueryParam "fields" Text
619− :> QueryParam "alt" Text
658+ "adsensehost" :>
659+ "v4.1" :>
660+ "adclients" :>
661+ Capture "adClientId" Text :>
662+ "customchannels" :>
663+ Capture "customChannelId" Text :>
664+ QueryParam "quotaUser" Text :>
665+ QueryParam "prettyPrint" Bool :>
666+ QueryParam "userIp" Text :>
667+ QueryParam "key" Text :>
668+ QueryParam "oauth_token" Text :>
669+ QueryParam "fields" Text :>
670+ QueryParam "alt" Text :> Get '[JSON] CustomChannel
620671
621672-- | Delete a specific custom channel from the host AdSense account.
622673type CustomchannelsDelete =
623− "adsensehost" :> "v4.1" :> "adclients" :>
624− Capture "adClientId" Text
625− :> "customchannels"
626− :> Capture "customChannelId" Text
627− :> QueryParam "quotaUser" Text
628− :> QueryParam "prettyPrint" Bool
629− :> QueryParam "userIp" Text
630− :> QueryParam "key" Text
631− :> QueryParam "oauth_token" Text
632− :> QueryParam "fields" Text
633− :> QueryParam "alt" Text
674+ "adsensehost" :>
675+ "v4.1" :>
676+ "adclients" :>
677+ Capture "adClientId" Text :>
678+ "customchannels" :>
679+ Capture "customChannelId" Text :>
680+ QueryParam "quotaUser" Text :>
681+ QueryParam "prettyPrint" Bool :>
682+ QueryParam "userIp" Text :>
683+ QueryParam "key" Text :>
684+ QueryParam "oauth_token" Text :>
685+ QueryParam "fields" Text :>
686+ QueryParam "alt" Text :>
687+ Delete '[JSON] CustomChannel
634688
635689-- | Update a custom channel in the host AdSense account.
636690type CustomchannelsUpdate =
637− "adsensehost" :> "v4.1" :> "adclients" :>
638− Capture "adClientId" Text
639− :> "customchannels"
640− :> QueryParam "quotaUser" Text
641− :> QueryParam "prettyPrint" Bool
642− :> QueryParam "userIp" Text
643− :> QueryParam "key" Text
644− :> QueryParam "oauth_token" Text
645− :> QueryParam "fields" Text
646− :> QueryParam "alt" Text
691+ "adsensehost" :>
692+ "v4.1" :>
693+ "adclients" :>
694+ Capture "adClientId" Text :>
695+ "customchannels" :>
696+ QueryParam "quotaUser" Text :>
697+ QueryParam "prettyPrint" Bool :>
698+ QueryParam "userIp" Text :>
699+ QueryParam "key" Text :>
700+ QueryParam "oauth_token" Text :>
701+ QueryParam "fields" Text :>
702+ QueryParam "alt" Text :> Put '[JSON] CustomChannel
gogol-adsense-host/gen/Network/Google/AdSense/Host/Types/Product.hs+372
@@ -1,6 +1,7 @@
11{-# LANGUAGE DeriveDataTypeable #-}
22{-# LANGUAGE DeriveGeneric #-}
33{-# LANGUAGE OverloadedStrings #-}
4+{-# LANGUAGE RecordWildCards #-}
45
56{-# OPTIONS_GHC -fno-warn-unused-imports #-}
67
@@ -64,6 +65,24 @@ accName = lens _accName (\ s a -> s{_accName = a})
6465accId :: Lens' Account (Maybe Text)
6566accId = lens _accId (\ s a -> s{_accId = a})
6667
68+instance FromJSON Account where
69+ parseJSON
70+ = withObject "Account"
71+ (\ o ->
72+ Account <$>
73+ (o .:? "status") <*>
74+ (o .:? "kind" .!= "adsensehost#account")
75+ <*> (o .:? "name")
76+ <*> (o .:? "id"))
77+
78+instance ToJSON Account where
79+ toJSON Account{..}
80+ = object
81+ (catMaybes
82+ [("status" .=) <$> _accStatus,
83+ Just ("kind" .= _accKind), ("name" .=) <$> _accName,
84+ ("id" .=) <$> _accId])
85+
6786--
6887-- /See:/ 'accounts' smart constructor.
6988data Accounts = Accounts
@@ -104,6 +123,22 @@ aItems
104123 = lens _aItems (\ s a -> s{_aItems = a}) . _Default .
105124 _Coerce
106125
126+instance FromJSON Accounts where
127+ parseJSON
128+ = withObject "Accounts"
129+ (\ o ->
130+ Accounts <$>
131+ (o .:? "etag") <*>
132+ (o .:? "kind" .!= "adsensehost#accounts")
133+ <*> (o .:? "items" .!= mempty))
134+
135+instance ToJSON Accounts where
136+ toJSON Accounts{..}
137+ = object
138+ (catMaybes
139+ [("etag" .=) <$> _aEtag, Just ("kind" .= _aKind),
140+ ("items" .=) <$> _aItems])
141+
107142--
108143-- /See:/ 'adClient' smart constructor.
109144data AdClient = AdClient
@@ -164,6 +199,27 @@ acProductCode
164199 = lens _acProductCode
165200 (\ s a -> s{_acProductCode = a})
166201
202+instance FromJSON AdClient where
203+ parseJSON
204+ = withObject "AdClient"
205+ (\ o ->
206+ AdClient <$>
207+ (o .:? "kind" .!= "adsensehost#adClient") <*>
208+ (o .:? "arcOptIn")
209+ <*> (o .:? "supportsReporting")
210+ <*> (o .:? "id")
211+ <*> (o .:? "productCode"))
212+
213+instance ToJSON AdClient where
214+ toJSON AdClient{..}
215+ = object
216+ (catMaybes
217+ [Just ("kind" .= _acKind),
218+ ("arcOptIn" .=) <$> _acArcOptIn,
219+ ("supportsReporting" .=) <$> _acSupportsReporting,
220+ ("id" .=) <$> _acId,
221+ ("productCode" .=) <$> _acProductCode])
222+
167223--
168224-- /See:/ 'adClients' smart constructor.
169225data AdClients = AdClients
@@ -216,6 +272,24 @@ acsItems
216272 _Default
217273 . _Coerce
218274
275+instance FromJSON AdClients where
276+ parseJSON
277+ = withObject "AdClients"
278+ (\ o ->
279+ AdClients <$>
280+ (o .:? "etag") <*> (o .:? "nextPageToken") <*>
281+ (o .:? "kind" .!= "adsensehost#adClients")
282+ <*> (o .:? "items" .!= mempty))
283+
284+instance ToJSON AdClients where
285+ toJSON AdClients{..}
286+ = object
287+ (catMaybes
288+ [("etag" .=) <$> _acsEtag,
289+ ("nextPageToken" .=) <$> _acsNextPageToken,
290+ Just ("kind" .= _acsKind),
291+ ("items" .=) <$> _acsItems])
292+
219293--
220294-- /See:/ 'adCode' smart constructor.
221295data AdCode = AdCode
@@ -246,6 +320,21 @@ adKind = lens _adKind (\ s a -> s{_adKind = a})
246320adAdCode :: Lens' AdCode (Maybe Text)
247321adAdCode = lens _adAdCode (\ s a -> s{_adAdCode = a})
248322
323+instance FromJSON AdCode where
324+ parseJSON
325+ = withObject "AdCode"
326+ (\ o ->
327+ AdCode <$>
328+ (o .:? "kind" .!= "adsensehost#adCode") <*>
329+ (o .:? "adCode"))
330+
331+instance ToJSON AdCode where
332+ toJSON AdCode{..}
333+ = object
334+ (catMaybes
335+ [Just ("kind" .= _adKind),
336+ ("adCode" .=) <$> _adAdCode])
337+
249338--
250339-- /See:/ 'adStyle' smart constructor.
251340data AdStyle = AdStyle
@@ -297,6 +386,24 @@ assColors :: Lens' AdStyle (Maybe AdStyleColors)
297386assColors
298387 = lens _assColors (\ s a -> s{_assColors = a})
299388
389+instance FromJSON AdStyle where
390+ parseJSON
391+ = withObject "AdStyle"
392+ (\ o ->
393+ AdStyle <$>
394+ (o .:? "corners") <*>
395+ (o .:? "kind" .!= "adsensehost#adStyle")
396+ <*> (o .:? "font")
397+ <*> (o .:? "colors"))
398+
399+instance ToJSON AdStyle where
400+ toJSON AdStyle{..}
401+ = object
402+ (catMaybes
403+ [("corners" .=) <$> _assCorners,
404+ Just ("kind" .= _assKind), ("font" .=) <$> _assFont,
405+ ("colors" .=) <$> _assColors])
406+
300407-- | The colors included in the style. These are represented as six
301408-- hexadecimal characters, similar to HTML color codes, but without the
302409-- leading hash.
@@ -357,6 +464,24 @@ ascBackground
357464 = lens _ascBackground
358465 (\ s a -> s{_ascBackground = a})
359466
467+instance FromJSON AdStyleColors where
468+ parseJSON
469+ = withObject "AdStyleColors"
470+ (\ o ->
471+ AdStyleColors <$>
472+ (o .:? "text") <*> (o .:? "url") <*> (o .:? "border")
473+ <*> (o .:? "title")
474+ <*> (o .:? "background"))
475+
476+instance ToJSON AdStyleColors where
477+ toJSON AdStyleColors{..}
478+ = object
479+ (catMaybes
480+ [("text" .=) <$> _ascText, ("url" .=) <$> _ascUrl,
481+ ("border" .=) <$> _ascBorder,
482+ ("title" .=) <$> _ascTitle,
483+ ("background" .=) <$> _ascBackground])
484+
360485-- | The font which is included in the style.
361486--
362487-- /See:/ 'adStyleFont' smart constructor.
@@ -391,6 +516,19 @@ asfFamily :: Lens' AdStyleFont (Maybe Text)
391516asfFamily
392517 = lens _asfFamily (\ s a -> s{_asfFamily = a})
393518
519+instance FromJSON AdStyleFont where
520+ parseJSON
521+ = withObject "AdStyleFont"
522+ (\ o ->
523+ AdStyleFont <$> (o .:? "size") <*> (o .:? "family"))
524+
525+instance ToJSON AdStyleFont where
526+ toJSON AdStyleFont{..}
527+ = object
528+ (catMaybes
529+ [("size" .=) <$> _asfSize,
530+ ("family" .=) <$> _asfFamily])
531+
394532--
395533-- /See:/ 'adUnit' smart constructor.
396534data AdUnit = AdUnit
@@ -482,6 +620,33 @@ auuCode = lens _auuCode (\ s a -> s{_auuCode = a})
482620auuId :: Lens' AdUnit (Maybe Text)
483621auuId = lens _auuId (\ s a -> s{_auuId = a})
484622
623+instance FromJSON AdUnit where
624+ parseJSON
625+ = withObject "AdUnit"
626+ (\ o ->
627+ AdUnit <$>
628+ (o .:? "status") <*>
629+ (o .:? "mobileContentAdsSettings")
630+ <*> (o .:? "kind" .!= "adsensehost#adUnit")
631+ <*> (o .:? "customStyle")
632+ <*> (o .:? "name")
633+ <*> (o .:? "contentAdsSettings")
634+ <*> (o .:? "code")
635+ <*> (o .:? "id"))
636+
637+instance ToJSON AdUnit where
638+ toJSON AdUnit{..}
639+ = object
640+ (catMaybes
641+ [("status" .=) <$> _auuStatus,
642+ ("mobileContentAdsSettings" .=) <$>
643+ _auuMobileContentAdsSettings,
644+ Just ("kind" .= _auuKind),
645+ ("customStyle" .=) <$> _auuCustomStyle,
646+ ("name" .=) <$> _auuName,
647+ ("contentAdsSettings" .=) <$> _auuContentAdsSettings,
648+ ("code" .=) <$> _auuCode, ("id" .=) <$> _auuId])
649+
485650-- | The backup option to be used in instances where no ad is available.
486651--
487652-- /See:/ 'adUnitBackupOptionContentAdsSettings' smart constructor.
@@ -526,6 +691,23 @@ aubocasType :: Lens' AdUnitBackupOptionContentAdsSettings (Maybe Text)
526691aubocasType
527692 = lens _aubocasType (\ s a -> s{_aubocasType = a})
528693
694+instance FromJSON
695+ AdUnitBackupOptionContentAdsSettings where
696+ parseJSON
697+ = withObject "AdUnitBackupOptionContentAdsSettings"
698+ (\ o ->
699+ AdUnitBackupOptionContentAdsSettings <$>
700+ (o .:? "color") <*> (o .:? "url") <*> (o .:? "type"))
701+
702+instance ToJSON AdUnitBackupOptionContentAdsSettings
703+ where
704+ toJSON AdUnitBackupOptionContentAdsSettings{..}
705+ = object
706+ (catMaybes
707+ [("color" .=) <$> _aubocasColor,
708+ ("url" .=) <$> _aubocasUrl,
709+ ("type" .=) <$> _aubocasType])
710+
529711-- | Settings specific to content ads (AFC) and highend mobile content ads
530712-- (AFMC).
531713--
@@ -571,6 +753,22 @@ aucasType :: Lens' AdUnitContentAdsSettings (Maybe Text)
571753aucasType
572754 = lens _aucasType (\ s a -> s{_aucasType = a})
573755
756+instance FromJSON AdUnitContentAdsSettings where
757+ parseJSON
758+ = withObject "AdUnitContentAdsSettings"
759+ (\ o ->
760+ AdUnitContentAdsSettings <$>
761+ (o .:? "backupOption") <*> (o .:? "size") <*>
762+ (o .:? "type"))
763+
764+instance ToJSON AdUnitContentAdsSettings where
765+ toJSON AdUnitContentAdsSettings{..}
766+ = object
767+ (catMaybes
768+ [("backupOption" .=) <$> _aucasBackupOption,
769+ ("size" .=) <$> _aucasSize,
770+ ("type" .=) <$> _aucasType])
771+
574772-- | Settings specific to WAP mobile content ads (AFMC).
575773--
576774-- /See:/ 'adUnitMobileContentAdsSettings' smart constructor.
@@ -624,6 +822,26 @@ aumcasType :: Lens' AdUnitMobileContentAdsSettings (Maybe Text)
624822aumcasType
625823 = lens _aumcasType (\ s a -> s{_aumcasType = a})
626824
825+instance FromJSON AdUnitMobileContentAdsSettings
826+ where
827+ parseJSON
828+ = withObject "AdUnitMobileContentAdsSettings"
829+ (\ o ->
830+ AdUnitMobileContentAdsSettings <$>
831+ (o .:? "size") <*> (o .:? "scriptingLanguage") <*>
832+ (o .:? "markupLanguage")
833+ <*> (o .:? "type"))
834+
835+instance ToJSON AdUnitMobileContentAdsSettings where
836+ toJSON AdUnitMobileContentAdsSettings{..}
837+ = object
838+ (catMaybes
839+ [("size" .=) <$> _aumcasSize,
840+ ("scriptingLanguage" .=) <$>
841+ _aumcasScriptingLanguage,
842+ ("markupLanguage" .=) <$> _aumcasMarkupLanguage,
843+ ("type" .=) <$> _aumcasType])
844+
627845--
628846-- /See:/ 'adUnits' smart constructor.
629847data AdUnits = AdUnits
@@ -675,6 +893,23 @@ auItems
675893 = lens _auItems (\ s a -> s{_auItems = a}) . _Default
676894 . _Coerce
677895
896+instance FromJSON AdUnits where
897+ parseJSON
898+ = withObject "AdUnits"
899+ (\ o ->
900+ AdUnits <$>
901+ (o .:? "etag") <*> (o .:? "nextPageToken") <*>
902+ (o .:? "kind" .!= "adsensehost#adUnits")
903+ <*> (o .:? "items" .!= mempty))
904+
905+instance ToJSON AdUnits where
906+ toJSON AdUnits{..}
907+ = object
908+ (catMaybes
909+ [("etag" .=) <$> _auEtag,
910+ ("nextPageToken" .=) <$> _auNextPageToken,
911+ Just ("kind" .= _auKind), ("items" .=) <$> _auItems])
912+
678913--
679914-- /See:/ 'associationSession' smart constructor.
680915data AssociationSession = AssociationSession
@@ -776,6 +1011,35 @@ asRedirectUrl
7761011 = lens _asRedirectUrl
7771012 (\ s a -> s{_asRedirectUrl = a})
7781013
1014+instance FromJSON AssociationSession where
1015+ parseJSON
1016+ = withObject "AssociationSession"
1017+ (\ o ->
1018+ AssociationSession <$>
1019+ (o .:? "status") <*>
1020+ (o .:? "kind" .!= "adsensehost#associationSession")
1021+ <*> (o .:? "websiteLocale")
1022+ <*> (o .:? "userLocale")
1023+ <*> (o .:? "accountId")
1024+ <*> (o .:? "productCodes" .!= mempty)
1025+ <*> (o .:? "id")
1026+ <*> (o .:? "websiteUrl")
1027+ <*> (o .:? "redirectUrl"))
1028+
1029+instance ToJSON AssociationSession where
1030+ toJSON AssociationSession{..}
1031+ = object
1032+ (catMaybes
1033+ [("status" .=) <$> _asStatus,
1034+ Just ("kind" .= _asKind),
1035+ ("websiteLocale" .=) <$> _asWebsiteLocale,
1036+ ("userLocale" .=) <$> _asUserLocale,
1037+ ("accountId" .=) <$> _asAccountId,
1038+ ("productCodes" .=) <$> _asProductCodes,
1039+ ("id" .=) <$> _asId,
1040+ ("websiteUrl" .=) <$> _asWebsiteUrl,
1041+ ("redirectUrl" .=) <$> _asRedirectUrl])
1042+
7791043--
7801044-- /See:/ 'customChannel' smart constructor.
7811045data CustomChannel = CustomChannel
@@ -824,6 +1088,23 @@ ccCode = lens _ccCode (\ s a -> s{_ccCode = a})
8241088ccId :: Lens' CustomChannel (Maybe Text)
8251089ccId = lens _ccId (\ s a -> s{_ccId = a})
8261090
1091+instance FromJSON CustomChannel where
1092+ parseJSON
1093+ = withObject "CustomChannel"
1094+ (\ o ->
1095+ CustomChannel <$>
1096+ (o .:? "kind" .!= "adsensehost#customChannel") <*>
1097+ (o .:? "name")
1098+ <*> (o .:? "code")
1099+ <*> (o .:? "id"))
1100+
1101+instance ToJSON CustomChannel where
1102+ toJSON CustomChannel{..}
1103+ = object
1104+ (catMaybes
1105+ [Just ("kind" .= _ccKind), ("name" .=) <$> _ccName,
1106+ ("code" .=) <$> _ccCode, ("id" .=) <$> _ccId])
1107+
8271108--
8281109-- /See:/ 'customChannels' smart constructor.
8291110data CustomChannels = CustomChannels
@@ -876,6 +1157,23 @@ cItems
8761157 = lens _cItems (\ s a -> s{_cItems = a}) . _Default .
8771158 _Coerce
8781159
1160+instance FromJSON CustomChannels where
1161+ parseJSON
1162+ = withObject "CustomChannels"
1163+ (\ o ->
1164+ CustomChannels <$>
1165+ (o .:? "etag") <*> (o .:? "nextPageToken") <*>
1166+ (o .:? "kind" .!= "adsensehost#customChannels")
1167+ <*> (o .:? "items" .!= mempty))
1168+
1169+instance ToJSON CustomChannels where
1170+ toJSON CustomChannels{..}
1171+ = object
1172+ (catMaybes
1173+ [("etag" .=) <$> _cEtag,
1174+ ("nextPageToken" .=) <$> _cNextPageToken,
1175+ Just ("kind" .= _cKind), ("items" .=) <$> _cItems])
1176+
8791177--
8801178-- /See:/ 'report' smart constructor.
8811179data Report = Report
@@ -970,6 +1268,30 @@ rTotalMatchedRows
9701268 = lens _rTotalMatchedRows
9711269 (\ s a -> s{_rTotalMatchedRows = a})
9721270
1271+instance FromJSON Report where
1272+ parseJSON
1273+ = withObject "Report"
1274+ (\ o ->
1275+ Report <$>
1276+ (o .:? "kind" .!= "adsensehost#report") <*>
1277+ (o .:? "averages" .!= mempty)
1278+ <*> (o .:? "warnings" .!= mempty)
1279+ <*> (o .:? "rows" .!= mempty)
1280+ <*> (o .:? "totals" .!= mempty)
1281+ <*> (o .:? "headers" .!= mempty)
1282+ <*> (o .:? "totalMatchedRows"))
1283+
1284+instance ToJSON Report where
1285+ toJSON Report{..}
1286+ = object
1287+ (catMaybes
1288+ [Just ("kind" .= _rKind),
1289+ ("averages" .=) <$> _rAverages,
1290+ ("warnings" .=) <$> _rWarnings,
1291+ ("rows" .=) <$> _rRows, ("totals" .=) <$> _rTotals,
1292+ ("headers" .=) <$> _rHeaders,
1293+ ("totalMatchedRows" .=) <$> _rTotalMatchedRows])
1294+
9731295--
9741296-- /See:/ 'reportItemHeaders' smart constructor.
9751297data ReportItemHeaders = ReportItemHeaders
@@ -1011,6 +1333,22 @@ rihCurrency
10111333rihType :: Lens' ReportItemHeaders (Maybe Text)
10121334rihType = lens _rihType (\ s a -> s{_rihType = a})
10131335
1336+instance FromJSON ReportItemHeaders where
1337+ parseJSON
1338+ = withObject "ReportItemHeaders"
1339+ (\ o ->
1340+ ReportItemHeaders <$>
1341+ (o .:? "name") <*> (o .:? "currency") <*>
1342+ (o .:? "type"))
1343+
1344+instance ToJSON ReportItemHeaders where
1345+ toJSON ReportItemHeaders{..}
1346+ = object
1347+ (catMaybes
1348+ [("name" .=) <$> _rihName,
1349+ ("currency" .=) <$> _rihCurrency,
1350+ ("type" .=) <$> _rihType])
1351+
10141352--
10151353-- /See:/ 'urlChannel' smart constructor.
10161354data UrlChannel = UrlChannel
@@ -1053,6 +1391,22 @@ ucUrlPattern :: Lens' UrlChannel (Maybe Text)
10531391ucUrlPattern
10541392 = lens _ucUrlPattern (\ s a -> s{_ucUrlPattern = a})
10551393
1394+instance FromJSON UrlChannel where
1395+ parseJSON
1396+ = withObject "UrlChannel"
1397+ (\ o ->
1398+ UrlChannel <$>
1399+ (o .:? "kind" .!= "adsensehost#urlChannel") <*>
1400+ (o .:? "id")
1401+ <*> (o .:? "urlPattern"))
1402+
1403+instance ToJSON UrlChannel where
1404+ toJSON UrlChannel{..}
1405+ = object
1406+ (catMaybes
1407+ [Just ("kind" .= _ucKind), ("id" .=) <$> _ucId,
1408+ ("urlPattern" .=) <$> _ucUrlPattern])
1409+
10561410--
10571411-- /See:/ 'urlChannels' smart constructor.
10581412data UrlChannels = UrlChannels
@@ -1105,3 +1459,21 @@ urlcItems
11051459 = lens _urlcItems (\ s a -> s{_urlcItems = a}) .
11061460 _Default
11071461 . _Coerce
1462+
1463+instance FromJSON UrlChannels where
1464+ parseJSON
1465+ = withObject "UrlChannels"
1466+ (\ o ->
1467+ UrlChannels <$>
1468+ (o .:? "etag") <*> (o .:? "nextPageToken") <*>
1469+ (o .:? "kind" .!= "adsensehost#urlChannels")
1470+ <*> (o .:? "items" .!= mempty))
1471+
1472+instance ToJSON UrlChannels where
1473+ toJSON UrlChannels{..}
1474+ = object
1475+ (catMaybes
1476+ [("etag" .=) <$> _urlcEtag,
1477+ ("nextPageToken" .=) <$> _urlcNextPageToken,
1478+ Just ("kind" .= _urlcKind),
1479+ ("items" .=) <$> _urlcItems])
gogol-adsense/gen/Network/Google/AdSense.hs+335−275
@@ -351,16 +351,18 @@ type AdclientsAPI = AdclientsList
351351
352352-- | List all ad clients in this AdSense account.
353353type AdclientsList =
354− "adsense" :> "v1.4" :> "adclients" :>
355− QueryParam "quotaUser" Text
356− :> QueryParam "prettyPrint" Bool
357− :> QueryParam "userIp" Text
358− :> QueryParam "key" Text
359− :> QueryParam "pageToken" Text
360− :> QueryParam "oauth_token" Text
361− :> QueryParam "maxResults" Int32
362− :> QueryParam "fields" Text
363− :> QueryParam "alt" Text
354+ "adsense" :>
355+ "v1.4" :>
356+ "adclients" :>
357+ QueryParam "quotaUser" Text :>
358+ QueryParam "prettyPrint" Bool :>
359+ QueryParam "userIp" Text :>
360+ QueryParam "key" Text :>
361+ QueryParam "pageToken" Text :>
362+ QueryParam "oauth_token" Text :>
363+ QueryParam "maxResults" Int32 :>
364+ QueryParam "fields" Text :>
365+ QueryParam "alt" Text :> Get '[JSON] AdClients
364366
365367type AccountsAPI =
366368 AdclientsAPI :<|> ReportsAPI :<|> AlertsAPI :<|>
@@ -374,18 +376,20 @@ type AdclientsAPI = AdclientsList
374376
375377-- | List all ad clients in the specified account.
376378type AdclientsList =
377− "adsense" :> "v1.4" :> "accounts" :>
378− Capture "accountId" Text
379− :> "adclients"
380− :> QueryParam "quotaUser" Text
381− :> QueryParam "prettyPrint" Bool
382− :> QueryParam "userIp" Text
383− :> QueryParam "key" Text
384− :> QueryParam "pageToken" Text
385− :> QueryParam "oauth_token" Text
386− :> QueryParam "maxResults" Int32
387− :> QueryParam "fields" Text
388− :> QueryParam "alt" Text
379+ "adsense" :>
380+ "v1.4" :>
381+ "accounts" :>
382+ Capture "accountId" Text :>
383+ "adclients" :>
384+ QueryParam "quotaUser" Text :>
385+ QueryParam "prettyPrint" Bool :>
386+ QueryParam "userIp" Text :>
387+ QueryParam "key" Text :>
388+ QueryParam "pageToken" Text :>
389+ QueryParam "oauth_token" Text :>
390+ QueryParam "maxResults" Int32 :>
391+ QueryParam "fields" Text :>
392+ QueryParam "alt" Text :> Get '[JSON] AdClients
389393
390394type ReportsAPI = SavedAPI
391395
@@ -393,68 +397,78 @@ type SavedAPI = SavedList :<|> SavedGenerate
393397
394398-- | List all saved reports in the specified AdSense account.
395399type SavedList =
396− "adsense" :> "v1.4" :> "accounts" :>
397− Capture "accountId" Text
398− :> "reports"
399− :> "saved"
400− :> QueryParam "quotaUser" Text
401− :> QueryParam "prettyPrint" Bool
402− :> QueryParam "userIp" Text
403− :> QueryParam "key" Text
404− :> QueryParam "pageToken" Text
405− :> QueryParam "oauth_token" Text
406− :> QueryParam "maxResults" Int32
407− :> QueryParam "fields" Text
408− :> QueryParam "alt" Text
400+ "adsense" :>
401+ "v1.4" :>
402+ "accounts" :>
403+ Capture "accountId" Text :>
404+ "reports" :>
405+ "saved" :>
406+ QueryParam "quotaUser" Text :>
407+ QueryParam "prettyPrint" Bool :>
408+ QueryParam "userIp" Text :>
409+ QueryParam "key" Text :>
410+ QueryParam "pageToken" Text :>
411+ QueryParam "oauth_token" Text :>
412+ QueryParam "maxResults" Int32 :>
413+ QueryParam "fields" Text :>
414+ QueryParam "alt" Text :>
415+ Get '[JSON] SavedReports
409416
410417-- | Generate an AdSense report based on the saved report ID sent in the
411418-- query parameters.
412419type SavedGenerate =
413− "adsense" :> "v1.4" :> "accounts" :>
414− Capture "accountId" Text
415− :> "reports"
416− :> Capture "savedReportId" Text
417− :> QueryParam "quotaUser" Text
418− :> QueryParam "prettyPrint" Bool
419− :> QueryParam "userIp" Text
420− :> QueryParam "locale" Text
421− :> QueryParam "key" Text
422− :> QueryParam "oauth_token" Text
423− :> QueryParam "startIndex" Int32
424− :> QueryParam "maxResults" Int32
425− :> QueryParam "fields" Text
426− :> QueryParam "alt" Text
420+ "adsense" :>
421+ "v1.4" :>
422+ "accounts" :>
423+ Capture "accountId" Text :>
424+ "reports" :>
425+ Capture "savedReportId" Text :>
426+ QueryParam "quotaUser" Text :>
427+ QueryParam "prettyPrint" Bool :>
428+ QueryParam "userIp" Text :>
429+ QueryParam "locale" Text :>
430+ QueryParam "key" Text :>
431+ QueryParam "oauth_token" Text :>
432+ QueryParam "startIndex" Int32 :>
433+ QueryParam "maxResults" Int32 :>
434+ QueryParam "fields" Text :>
435+ QueryParam "alt" Text :>
436+ Get '[JSON] AdsenseReportsGenerateResponse
427437
428438type AlertsAPI = AlertsList :<|> AlertsDelete
429439
430440-- | List the alerts for the specified AdSense account.
431441type AlertsList =
432− "adsense" :> "v1.4" :> "accounts" :>
433− Capture "accountId" Text
434− :> "alerts"
435− :> QueryParam "quotaUser" Text
436− :> QueryParam "prettyPrint" Bool
437− :> QueryParam "userIp" Text
438− :> QueryParam "locale" Text
439− :> QueryParam "key" Text
440− :> QueryParam "oauth_token" Text
441− :> QueryParam "fields" Text
442− :> QueryParam "alt" Text
442+ "adsense" :>
443+ "v1.4" :>
444+ "accounts" :>
445+ Capture "accountId" Text :>
446+ "alerts" :>
447+ QueryParam "quotaUser" Text :>
448+ QueryParam "prettyPrint" Bool :>
449+ QueryParam "userIp" Text :>
450+ QueryParam "locale" Text :>
451+ QueryParam "key" Text :>
452+ QueryParam "oauth_token" Text :>
453+ QueryParam "fields" Text :>
454+ QueryParam "alt" Text :> Get '[JSON] Alerts
443455
444456-- | Dismiss (delete) the specified alert from the specified publisher
445457-- AdSense account.
446458type AlertsDelete =
447− "adsense" :> "v1.4" :> "accounts" :>
448− Capture "accountId" Text
449− :> "alerts"
450− :> Capture "alertId" Text
451− :> QueryParam "quotaUser" Text
452− :> QueryParam "prettyPrint" Bool
453− :> QueryParam "userIp" Text
454− :> QueryParam "key" Text
455− :> QueryParam "oauth_token" Text
456− :> QueryParam "fields" Text
457− :> QueryParam "alt" Text
459+ "adsense" :>
460+ "v1.4" :>
461+ "accounts" :>
462+ Capture "accountId" Text :>
463+ "alerts" :>
464+ Capture "alertId" Text :>
465+ QueryParam "quotaUser" Text :>
466+ QueryParam "prettyPrint" Bool :>
467+ QueryParam "userIp" Text :>
468+ QueryParam "key" Text :>
469+ QueryParam "oauth_token" Text :>
470+ QueryParam "fields" Text :>
471+ QueryParam "alt" Text :> Delete '[JSON] ()
458472
459473type AdunitsAPI = CustomchannelsAPI
460474
@@ -462,42 +476,48 @@ type CustomchannelsAPI = CustomchannelsList
462476
463477-- | List all custom channels which the specified ad unit belongs to.
464478type CustomchannelsList =
465− "adsense" :> "v1.4" :> "accounts" :>
466− Capture "accountId" Text
467− :> "adclients"
468− :> Capture "adClientId" Text
469− :> "adunits"
470− :> Capture "adUnitId" Text
471− :> "customchannels"
472− :> QueryParam "quotaUser" Text
473− :> QueryParam "prettyPrint" Bool
474− :> QueryParam "userIp" Text
475− :> QueryParam "key" Text
476− :> QueryParam "pageToken" Text
477− :> QueryParam "oauth_token" Text
478− :> QueryParam "maxResults" Int32
479− :> QueryParam "fields" Text
480− :> QueryParam "alt" Text
479+ "adsense" :>
480+ "v1.4" :>
481+ "accounts" :>
482+ Capture "accountId" Text :>
483+ "adclients" :>
484+ Capture "adClientId" Text :>
485+ "adunits" :>
486+ Capture "adUnitId" Text :>
487+ "customchannels" :>
488+ QueryParam "quotaUser" Text :>
489+ QueryParam "prettyPrint" Bool :>
490+ QueryParam "userIp" Text :>
491+ QueryParam "key" Text :>
492+ QueryParam "pageToken" Text :>
493+ QueryParam "oauth_token" Text :>
494+ QueryParam "maxResults" Int32 :>
495+ QueryParam "fields" Text :>
496+ QueryParam "alt" Text :>
497+ Get '[JSON] CustomChannels
481498
482499type UrlchannelsAPI = UrlchannelsList
483500
484501-- | List all URL channels in the specified ad client for the specified
485502-- account.
486503type UrlchannelsList =
487− "adsense" :> "v1.4" :> "accounts" :>
488− Capture "accountId" Text
489− :> "adclients"
490− :> Capture "adClientId" Text
491− :> "urlchannels"
492− :> QueryParam "quotaUser" Text
493− :> QueryParam "prettyPrint" Bool
494− :> QueryParam "userIp" Text
495− :> QueryParam "key" Text
496− :> QueryParam "pageToken" Text
497− :> QueryParam "oauth_token" Text
498− :> QueryParam "maxResults" Int32
499− :> QueryParam "fields" Text
500− :> QueryParam "alt" Text
504+ "adsense" :>
505+ "v1.4" :>
506+ "accounts" :>
507+ Capture "accountId" Text :>
508+ "adclients" :>
509+ Capture "adClientId" Text :>
510+ "urlchannels" :>
511+ QueryParam "quotaUser" Text :>
512+ QueryParam "prettyPrint" Bool :>
513+ QueryParam "userIp" Text :>
514+ QueryParam "key" Text :>
515+ QueryParam "pageToken" Text :>
516+ QueryParam "oauth_token" Text :>
517+ QueryParam "maxResults" Int32 :>
518+ QueryParam "fields" Text :>
519+ QueryParam "alt" Text :>
520+ Get '[JSON] UrlChannels
501521
502522type CustomchannelsAPI = AdunitsAPI
503523
@@ -505,70 +525,80 @@ type AdunitsAPI = AdunitsList
505525
506526-- | List all ad units in the specified custom channel.
507527type AdunitsList =
508− "adsense" :> "v1.4" :> "accounts" :>
509− Capture "accountId" Text
510− :> "adclients"
511− :> Capture "adClientId" Text
512− :> "customchannels"
513− :> Capture "customChannelId" Text
514− :> "adunits"
515− :> QueryParam "quotaUser" Text
516− :> QueryParam "prettyPrint" Bool
517− :> QueryParam "includeInactive" Bool
518− :> QueryParam "userIp" Text
519− :> QueryParam "key" Text
520− :> QueryParam "pageToken" Text
521− :> QueryParam "oauth_token" Text
522− :> QueryParam "maxResults" Int32
523− :> QueryParam "fields" Text
524− :> QueryParam "alt" Text
528+ "adsense" :>
529+ "v1.4" :>
530+ "accounts" :>
531+ Capture "accountId" Text :>
532+ "adclients" :>
533+ Capture "adClientId" Text :>
534+ "customchannels" :>
535+ Capture "customChannelId" Text :>
536+ "adunits" :>
537+ QueryParam "quotaUser" Text :>
538+ QueryParam "prettyPrint" Bool :>
539+ QueryParam "includeInactive" Bool :>
540+ QueryParam "userIp" Text :>
541+ QueryParam "key" Text :>
542+ QueryParam "pageToken" Text :>
543+ QueryParam "oauth_token" Text :>
544+ QueryParam "maxResults" Int32 :>
545+ QueryParam "fields" Text :>
546+ QueryParam "alt" Text :>
547+ Get '[JSON] AdUnits
525548
526549type SavedadstylesAPI =
527550 SavedadstylesList :<|> SavedadstylesGet
528551
529552-- | List all saved ad styles in the specified account.
530553type SavedadstylesList =
531− "adsense" :> "v1.4" :> "accounts" :>
532− Capture "accountId" Text
533− :> "savedadstyles"
534− :> QueryParam "quotaUser" Text
535− :> QueryParam "prettyPrint" Bool
536− :> QueryParam "userIp" Text
537− :> QueryParam "key" Text
538− :> QueryParam "pageToken" Text
539− :> QueryParam "oauth_token" Text
540− :> QueryParam "maxResults" Int32
541− :> QueryParam "fields" Text
542− :> QueryParam "alt" Text
554+ "adsense" :>
555+ "v1.4" :>
556+ "accounts" :>
557+ Capture "accountId" Text :>
558+ "savedadstyles" :>
559+ QueryParam "quotaUser" Text :>
560+ QueryParam "prettyPrint" Bool :>
561+ QueryParam "userIp" Text :>
562+ QueryParam "key" Text :>
563+ QueryParam "pageToken" Text :>
564+ QueryParam "oauth_token" Text :>
565+ QueryParam "maxResults" Int32 :>
566+ QueryParam "fields" Text :>
567+ QueryParam "alt" Text :>
568+ Get '[JSON] SavedAdStyles
543569
544570-- | List a specific saved ad style for the specified account.
545571type SavedadstylesGet =
546− "adsense" :> "v1.4" :> "accounts" :>
547− Capture "accountId" Text
548− :> "savedadstyles"
549− :> Capture "savedAdStyleId" Text
550− :> QueryParam "quotaUser" Text
551− :> QueryParam "prettyPrint" Bool
552− :> QueryParam "userIp" Text
553− :> QueryParam "key" Text
554− :> QueryParam "oauth_token" Text
555− :> QueryParam "fields" Text
556− :> QueryParam "alt" Text
572+ "adsense" :>
573+ "v1.4" :>
574+ "accounts" :>
575+ Capture "accountId" Text :>
576+ "savedadstyles" :>
577+ Capture "savedAdStyleId" Text :>
578+ QueryParam "quotaUser" Text :>
579+ QueryParam "prettyPrint" Bool :>
580+ QueryParam "userIp" Text :>
581+ QueryParam "key" Text :>
582+ QueryParam "oauth_token" Text :>
583+ QueryParam "fields" Text :>
584+ QueryParam "alt" Text :> Get '[JSON] SavedAdStyle
557585
558586type PaymentsAPI = PaymentsList
559587
560588-- | List the payments for the specified AdSense account.
561589type PaymentsList =
562− "adsense" :> "v1.4" :> "accounts" :>
563− Capture "accountId" Text
564− :> "payments"
565− :> QueryParam "quotaUser" Text
566− :> QueryParam "prettyPrint" Bool
567− :> QueryParam "userIp" Text
568− :> QueryParam "key" Text
569− :> QueryParam "oauth_token" Text
570− :> QueryParam "fields" Text
571− :> QueryParam "alt" Text
590+ "adsense" :>
591+ "v1.4" :>
592+ "accounts" :>
593+ Capture "accountId" Text :>
594+ "payments" :>
595+ QueryParam "quotaUser" Text :>
596+ QueryParam "prettyPrint" Bool :>
597+ QueryParam "userIp" Text :>
598+ QueryParam "key" Text :>
599+ QueryParam "oauth_token" Text :>
600+ QueryParam "fields" Text :>
601+ QueryParam "alt" Text :> Get '[JSON] Payments
572602
573603type ReportsAPI = SavedAPI
574604
@@ -576,59 +606,69 @@ type SavedAPI = SavedList :<|> SavedGenerate
576606
577607-- | List all saved reports in this AdSense account.
578608type SavedList =
579− "adsense" :> "v1.4" :> "reports" :> "saved" :>
580− QueryParam "quotaUser" Text
581− :> QueryParam "prettyPrint" Bool
582− :> QueryParam "userIp" Text
583− :> QueryParam "key" Text
584− :> QueryParam "pageToken" Text
585− :> QueryParam "oauth_token" Text
586− :> QueryParam "maxResults" Int32
587− :> QueryParam "fields" Text
588− :> QueryParam "alt" Text
609+ "adsense" :>
610+ "v1.4" :>
611+ "reports" :>
612+ "saved" :>
613+ QueryParam "quotaUser" Text :>
614+ QueryParam "prettyPrint" Bool :>
615+ QueryParam "userIp" Text :>
616+ QueryParam "key" Text :>
617+ QueryParam "pageToken" Text :>
618+ QueryParam "oauth_token" Text :>
619+ QueryParam "maxResults" Int32 :>
620+ QueryParam "fields" Text :>
621+ QueryParam "alt" Text :> Get '[JSON] SavedReports
589622
590623-- | Generate an AdSense report based on the saved report ID sent in the
591624-- query parameters.
592625type SavedGenerate =
593− "adsense" :> "v1.4" :> "reports" :>
594− Capture "savedReportId" Text
595− :> QueryParam "quotaUser" Text
596− :> QueryParam "prettyPrint" Bool
597− :> QueryParam "userIp" Text
598− :> QueryParam "locale" Text
599− :> QueryParam "key" Text
600− :> QueryParam "oauth_token" Text
601− :> QueryParam "startIndex" Int32
602− :> QueryParam "maxResults" Int32
603− :> QueryParam "fields" Text
604− :> QueryParam "alt" Text
626+ "adsense" :>
627+ "v1.4" :>
628+ "reports" :>
629+ Capture "savedReportId" Text :>
630+ QueryParam "quotaUser" Text :>
631+ QueryParam "prettyPrint" Bool :>
632+ QueryParam "userIp" Text :>
633+ QueryParam "locale" Text :>
634+ QueryParam "key" Text :>
635+ QueryParam "oauth_token" Text :>
636+ QueryParam "startIndex" Int32 :>
637+ QueryParam "maxResults" Int32 :>
638+ QueryParam "fields" Text :>
639+ QueryParam "alt" Text :>
640+ Get '[JSON] AdsenseReportsGenerateResponse
605641
606642type AlertsAPI = AlertsList :<|> AlertsDelete
607643
608644-- | List the alerts for this AdSense account.
609645type AlertsList =
610− "adsense" :> "v1.4" :> "alerts" :>
611− QueryParam "quotaUser" Text
612− :> QueryParam "prettyPrint" Bool
613− :> QueryParam "userIp" Text
614− :> QueryParam "locale" Text
615− :> QueryParam "key" Text
616− :> QueryParam "oauth_token" Text
617− :> QueryParam "fields" Text
618− :> QueryParam "alt" Text
646+ "adsense" :>
647+ "v1.4" :>
648+ "alerts" :>
649+ QueryParam "quotaUser" Text :>
650+ QueryParam "prettyPrint" Bool :>
651+ QueryParam "userIp" Text :>
652+ QueryParam "locale" Text :>
653+ QueryParam "key" Text :>
654+ QueryParam "oauth_token" Text :>
655+ QueryParam "fields" Text :>
656+ QueryParam "alt" Text :> Get '[JSON] Alerts
619657
620658-- | Dismiss (delete) the specified alert from the publisher\'s AdSense
621659-- account.
622660type AlertsDelete =
623− "adsense" :> "v1.4" :> "alerts" :>
624− Capture "alertId" Text
625− :> QueryParam "quotaUser" Text
626− :> QueryParam "prettyPrint" Bool
627− :> QueryParam "userIp" Text
628− :> QueryParam "key" Text
629− :> QueryParam "oauth_token" Text
630− :> QueryParam "fields" Text
631− :> QueryParam "alt" Text
661+ "adsense" :>
662+ "v1.4" :>
663+ "alerts" :>
664+ Capture "alertId" Text :>
665+ QueryParam "quotaUser" Text :>
666+ QueryParam "prettyPrint" Bool :>
667+ QueryParam "userIp" Text :>
668+ QueryParam "key" Text :>
669+ QueryParam "oauth_token" Text :>
670+ QueryParam "fields" Text :>
671+ QueryParam "alt" Text :> Delete '[JSON] ()
632672
633673type AdunitsAPI = CustomchannelsAPI
634674
@@ -636,38 +676,43 @@ type CustomchannelsAPI = CustomchannelsList
636676
637677-- | List all custom channels which the specified ad unit belongs to.
638678type CustomchannelsList =
639− "adsense" :> "v1.4" :> "adclients" :>
640− Capture "adClientId" Text
641− :> "adunits"
642− :> Capture "adUnitId" Text
643− :> "customchannels"
644− :> QueryParam "quotaUser" Text
645− :> QueryParam "prettyPrint" Bool
646− :> QueryParam "userIp" Text
647− :> QueryParam "key" Text
648− :> QueryParam "pageToken" Text
649− :> QueryParam "oauth_token" Text
650− :> QueryParam "maxResults" Int32
651− :> QueryParam "fields" Text
652− :> QueryParam "alt" Text
679+ "adsense" :>
680+ "v1.4" :>
681+ "adclients" :>
682+ Capture "adClientId" Text :>
683+ "adunits" :>
684+ Capture "adUnitId" Text :>
685+ "customchannels" :>
686+ QueryParam "quotaUser" Text :>
687+ QueryParam "prettyPrint" Bool :>
688+ QueryParam "userIp" Text :>
689+ QueryParam "key" Text :>
690+ QueryParam "pageToken" Text :>
691+ QueryParam "oauth_token" Text :>
692+ QueryParam "maxResults" Int32 :>
693+ QueryParam "fields" Text :>
694+ QueryParam "alt" Text :>
695+ Get '[JSON] CustomChannels
653696
654697type UrlchannelsAPI = UrlchannelsList
655698
656699-- | List all URL channels in the specified ad client for this AdSense
657700-- account.
658701type UrlchannelsList =
659− "adsense" :> "v1.4" :> "adclients" :>
660− Capture "adClientId" Text
661− :> "urlchannels"
662− :> QueryParam "quotaUser" Text
663− :> QueryParam "prettyPrint" Bool
664− :> QueryParam "userIp" Text
665− :> QueryParam "key" Text
666− :> QueryParam "pageToken" Text
667− :> QueryParam "oauth_token" Text
668− :> QueryParam "maxResults" Int32
669− :> QueryParam "fields" Text
670− :> QueryParam "alt" Text
702+ "adsense" :>
703+ "v1.4" :>
704+ "adclients" :>
705+ Capture "adClientId" Text :>
706+ "urlchannels" :>
707+ QueryParam "quotaUser" Text :>
708+ QueryParam "prettyPrint" Bool :>
709+ QueryParam "userIp" Text :>
710+ QueryParam "key" Text :>
711+ QueryParam "pageToken" Text :>
712+ QueryParam "oauth_token" Text :>
713+ QueryParam "maxResults" Int32 :>
714+ QueryParam "fields" Text :>
715+ QueryParam "alt" Text :> Get '[JSON] UrlChannels
671716
672717type CustomchannelsAPI = AdunitsAPI
673718
@@ -675,49 +720,56 @@ type AdunitsAPI = AdunitsList
675720
676721-- | List all ad units in the specified custom channel.
677722type AdunitsList =
678− "adsense" :> "v1.4" :> "adclients" :>
679− Capture "adClientId" Text
680− :> "customchannels"
681− :> Capture "customChannelId" Text
682− :> "adunits"
683− :> QueryParam "quotaUser" Text
684− :> QueryParam "prettyPrint" Bool
685− :> QueryParam "includeInactive" Bool
686− :> QueryParam "userIp" Text
687− :> QueryParam "key" Text
688− :> QueryParam "pageToken" Text
689− :> QueryParam "oauth_token" Text
690− :> QueryParam "maxResults" Int32
691− :> QueryParam "fields" Text
692− :> QueryParam "alt" Text
723+ "adsense" :>
724+ "v1.4" :>
725+ "adclients" :>
726+ Capture "adClientId" Text :>
727+ "customchannels" :>
728+ Capture "customChannelId" Text :>
729+ "adunits" :>
730+ QueryParam "quotaUser" Text :>
731+ QueryParam "prettyPrint" Bool :>
732+ QueryParam "includeInactive" Bool :>
733+ QueryParam "userIp" Text :>
734+ QueryParam "key" Text :>
735+ QueryParam "pageToken" Text :>
736+ QueryParam "oauth_token" Text :>
737+ QueryParam "maxResults" Int32 :>
738+ QueryParam "fields" Text :>
739+ QueryParam "alt" Text :>
740+ Get '[JSON] AdUnits
693741
694742type SavedadstylesAPI =
695743 SavedadstylesList :<|> SavedadstylesGet
696744
697745-- | List all saved ad styles in the user\'s account.
698746type SavedadstylesList =
699− "adsense" :> "v1.4" :> "savedadstyles" :>
700− QueryParam "quotaUser" Text
701− :> QueryParam "prettyPrint" Bool
702− :> QueryParam "userIp" Text
703− :> QueryParam "key" Text
704− :> QueryParam "pageToken" Text
705− :> QueryParam "oauth_token" Text
706− :> QueryParam "maxResults" Int32
707− :> QueryParam "fields" Text
708− :> QueryParam "alt" Text
747+ "adsense" :>
748+ "v1.4" :>
749+ "savedadstyles" :>
750+ QueryParam "quotaUser" Text :>
751+ QueryParam "prettyPrint" Bool :>
752+ QueryParam "userIp" Text :>
753+ QueryParam "key" Text :>
754+ QueryParam "pageToken" Text :>
755+ QueryParam "oauth_token" Text :>
756+ QueryParam "maxResults" Int32 :>
757+ QueryParam "fields" Text :>
758+ QueryParam "alt" Text :> Get '[JSON] SavedAdStyles
709759
710760-- | Get a specific saved ad style from the user\'s account.
711761type SavedadstylesGet =
712− "adsense" :> "v1.4" :> "savedadstyles" :>
713− Capture "savedAdStyleId" Text
714− :> QueryParam "quotaUser" Text
715− :> QueryParam "prettyPrint" Bool
716− :> QueryParam "userIp" Text
717− :> QueryParam "key" Text
718− :> QueryParam "oauth_token" Text
719− :> QueryParam "fields" Text
720− :> QueryParam "alt" Text
762+ "adsense" :>
763+ "v1.4" :>
764+ "savedadstyles" :>
765+ Capture "savedAdStyleId" Text :>
766+ QueryParam "quotaUser" Text :>
767+ QueryParam "prettyPrint" Bool :>
768+ QueryParam "userIp" Text :>
769+ QueryParam "key" Text :>
770+ QueryParam "oauth_token" Text :>
771+ QueryParam "fields" Text :>
772+ QueryParam "alt" Text :> Get '[JSON] SavedAdStyle
721773
722774type MetadataAPI = MetricsAPI :<|> DimensionsAPI
723775
@@ -725,37 +777,45 @@ type MetricsAPI = MetricsList
725777
726778-- | List the metadata for the metrics available to this AdSense account.
727779type MetricsList =
728− "adsense" :> "v1.4" :> "metadata" :> "metrics" :>
729− QueryParam "quotaUser" Text
730− :> QueryParam "prettyPrint" Bool
731− :> QueryParam "userIp" Text
732− :> QueryParam "key" Text
733− :> QueryParam "oauth_token" Text
734− :> QueryParam "fields" Text
735− :> QueryParam "alt" Text
780+ "adsense" :>
781+ "v1.4" :>
782+ "metadata" :>
783+ "metrics" :>
784+ QueryParam "quotaUser" Text :>
785+ QueryParam "prettyPrint" Bool :>
786+ QueryParam "userIp" Text :>
787+ QueryParam "key" Text :>
788+ QueryParam "oauth_token" Text :>
789+ QueryParam "fields" Text :>
790+ QueryParam "alt" Text :> Get '[JSON] Metadata
736791
737792type DimensionsAPI = DimensionsList
738793
739794-- | List the metadata for the dimensions available to this AdSense account.
740795type DimensionsList =
741− "adsense" :> "v1.4" :> "metadata" :> "dimensions" :>
742− QueryParam "quotaUser" Text
743− :> QueryParam "prettyPrint" Bool
744− :> QueryParam "userIp" Text
745− :> QueryParam "key" Text
746− :> QueryParam "oauth_token" Text
747− :> QueryParam "fields" Text
748− :> QueryParam "alt" Text
796+ "adsense" :>
797+ "v1.4" :>
798+ "metadata" :>
799+ "dimensions" :>
800+ QueryParam "quotaUser" Text :>
801+ QueryParam "prettyPrint" Bool :>
802+ QueryParam "userIp" Text :>
803+ QueryParam "key" Text :>
804+ QueryParam "oauth_token" Text :>
805+ QueryParam "fields" Text :>
806+ QueryParam "alt" Text :> Get '[JSON] Metadata
749807
750808type PaymentsAPI = PaymentsList
751809
752810-- | List the payments for this AdSense account.
753811type PaymentsList =
754− "adsense" :> "v1.4" :> "payments" :>
755− QueryParam "quotaUser" Text
756− :> QueryParam "prettyPrint" Bool
757− :> QueryParam "userIp" Text
758− :> QueryParam "key" Text
759− :> QueryParam "oauth_token" Text
760− :> QueryParam "fields" Text
761− :> QueryParam "alt" Text
812+ "adsense" :>
813+ "v1.4" :>
814+ "payments" :>
815+ QueryParam "quotaUser" Text :>
816+ QueryParam "prettyPrint" Bool :>
817+ QueryParam "userIp" Text :>
818+ QueryParam "key" Text :>
819+ QueryParam "oauth_token" Text :>
820+ QueryParam "fields" Text :>
821+ QueryParam "alt" Text :> Get '[JSON] Payments
gogol-adsense/gen/Network/Google/AdSense/Types/Product.hs+583
@@ -1,6 +1,7 @@
11{-# LANGUAGE DeriveDataTypeable #-}
22{-# LANGUAGE DeriveGeneric #-}
33{-# LANGUAGE OverloadedStrings #-}
4+{-# LANGUAGE RecordWildCards #-}
45
56{-# OPTIONS_GHC -fno-warn-unused-imports #-}
67
@@ -85,6 +86,28 @@ accSubAccounts
8586 . _Default
8687 . _Coerce
8788
89+instance FromJSON Account where
90+ parseJSON
91+ = withObject "Account"
92+ (\ o ->
93+ Account <$>
94+ (o .:? "kind" .!= "adsense#account") <*>
95+ (o .:? "premium")
96+ <*> (o .:? "name")
97+ <*> (o .:? "id")
98+ <*> (o .:? "timezone")
99+ <*> (o .:? "subAccounts" .!= mempty))
100+
101+instance ToJSON Account where
102+ toJSON Account{..}
103+ = object
104+ (catMaybes
105+ [Just ("kind" .= _accKind),
106+ ("premium" .=) <$> _accPremium,
107+ ("name" .=) <$> _accName, ("id" .=) <$> _accId,
108+ ("timezone" .=) <$> _accTimezone,
109+ ("subAccounts" .=) <$> _accSubAccounts])
110+
88111--
89112-- /See:/ 'accounts' smart constructor.
90113data Accounts = Accounts
@@ -136,6 +159,23 @@ aItems
136159 = lens _aItems (\ s a -> s{_aItems = a}) . _Default .
137160 _Coerce
138161
162+instance FromJSON Accounts where
163+ parseJSON
164+ = withObject "Accounts"
165+ (\ o ->
166+ Accounts <$>
167+ (o .:? "etag") <*> (o .:? "nextPageToken") <*>
168+ (o .:? "kind" .!= "adsense#accounts")
169+ <*> (o .:? "items" .!= mempty))
170+
171+instance ToJSON Accounts where
172+ toJSON Accounts{..}
173+ = object
174+ (catMaybes
175+ [("etag" .=) <$> _aEtag,
176+ ("nextPageToken" .=) <$> _aNextPageToken,
177+ Just ("kind" .= _aKind), ("items" .=) <$> _aItems])
178+
139179--
140180-- /See:/ 'adClient' smart constructor.
141181data AdClient = AdClient
@@ -207,6 +247,29 @@ acArcReviewMode
207247 = lens _acArcReviewMode
208248 (\ s a -> s{_acArcReviewMode = a})
209249
250+instance FromJSON AdClient where
251+ parseJSON
252+ = withObject "AdClient"
253+ (\ o ->
254+ AdClient <$>
255+ (o .:? "kind" .!= "adsense#adClient") <*>
256+ (o .:? "arcOptIn")
257+ <*> (o .:? "supportsReporting")
258+ <*> (o .:? "id")
259+ <*> (o .:? "productCode")
260+ <*> (o .:? "arcReviewMode"))
261+
262+instance ToJSON AdClient where
263+ toJSON AdClient{..}
264+ = object
265+ (catMaybes
266+ [Just ("kind" .= _acKind),
267+ ("arcOptIn" .=) <$> _acArcOptIn,
268+ ("supportsReporting" .=) <$> _acSupportsReporting,
269+ ("id" .=) <$> _acId,
270+ ("productCode" .=) <$> _acProductCode,
271+ ("arcReviewMode" .=) <$> _acArcReviewMode])
272+
210273--
211274-- /See:/ 'adClients' smart constructor.
212275data AdClients = AdClients
@@ -259,6 +322,24 @@ acsItems
259322 _Default
260323 . _Coerce
261324
325+instance FromJSON AdClients where
326+ parseJSON
327+ = withObject "AdClients"
328+ (\ o ->
329+ AdClients <$>
330+ (o .:? "etag") <*> (o .:? "nextPageToken") <*>
331+ (o .:? "kind" .!= "adsense#adClients")
332+ <*> (o .:? "items" .!= mempty))
333+
334+instance ToJSON AdClients where
335+ toJSON AdClients{..}
336+ = object
337+ (catMaybes
338+ [("etag" .=) <$> _acsEtag,
339+ ("nextPageToken" .=) <$> _acsNextPageToken,
340+ Just ("kind" .= _acsKind),
341+ ("items" .=) <$> _acsItems])
342+
262343--
263344-- /See:/ 'adCode' smart constructor.
264345data AdCode = AdCode
@@ -289,6 +370,21 @@ adKind = lens _adKind (\ s a -> s{_adKind = a})
289370adAdCode :: Lens' AdCode (Maybe Text)
290371adAdCode = lens _adAdCode (\ s a -> s{_adAdCode = a})
291372
373+instance FromJSON AdCode where
374+ parseJSON
375+ = withObject "AdCode"
376+ (\ o ->
377+ AdCode <$>
378+ (o .:? "kind" .!= "adsense#adCode") <*>
379+ (o .:? "adCode"))
380+
381+instance ToJSON AdCode where
382+ toJSON AdCode{..}
383+ = object
384+ (catMaybes
385+ [Just ("kind" .= _adKind),
386+ ("adCode" .=) <$> _adAdCode])
387+
292388--
293389-- /See:/ 'adStyle' smart constructor.
294390data AdStyle = AdStyle
@@ -338,6 +434,24 @@ asFont = lens _asFont (\ s a -> s{_asFont = a})
338434asColors :: Lens' AdStyle (Maybe AdStyleColors)
339435asColors = lens _asColors (\ s a -> s{_asColors = a})
340436
437+instance FromJSON AdStyle where
438+ parseJSON
439+ = withObject "AdStyle"
440+ (\ o ->
441+ AdStyle <$>
442+ (o .:? "corners") <*>
443+ (o .:? "kind" .!= "adsense#adStyle")
444+ <*> (o .:? "font")
445+ <*> (o .:? "colors"))
446+
447+instance ToJSON AdStyle where
448+ toJSON AdStyle{..}
449+ = object
450+ (catMaybes
451+ [("corners" .=) <$> _asCorners,
452+ Just ("kind" .= _asKind), ("font" .=) <$> _asFont,
453+ ("colors" .=) <$> _asColors])
454+
341455-- | The colors which are included in the style. These are represented as six
342456-- hexadecimal characters, similar to HTML color codes, but without the
343457-- leading hash.
@@ -398,6 +512,24 @@ ascBackground
398512 = lens _ascBackground
399513 (\ s a -> s{_ascBackground = a})
400514
515+instance FromJSON AdStyleColors where
516+ parseJSON
517+ = withObject "AdStyleColors"
518+ (\ o ->
519+ AdStyleColors <$>
520+ (o .:? "text") <*> (o .:? "url") <*> (o .:? "border")
521+ <*> (o .:? "title")
522+ <*> (o .:? "background"))
523+
524+instance ToJSON AdStyleColors where
525+ toJSON AdStyleColors{..}
526+ = object
527+ (catMaybes
528+ [("text" .=) <$> _ascText, ("url" .=) <$> _ascUrl,
529+ ("border" .=) <$> _ascBorder,
530+ ("title" .=) <$> _ascTitle,
531+ ("background" .=) <$> _ascBackground])
532+
401533-- | The font which is included in the style.
402534--
403535-- /See:/ 'adStyleFont' smart constructor.
@@ -430,6 +562,19 @@ asfFamily :: Lens' AdStyleFont (Maybe Text)
430562asfFamily
431563 = lens _asfFamily (\ s a -> s{_asfFamily = a})
432564
565+instance FromJSON AdStyleFont where
566+ parseJSON
567+ = withObject "AdStyleFont"
568+ (\ o ->
569+ AdStyleFont <$> (o .:? "size") <*> (o .:? "family"))
570+
571+instance ToJSON AdStyleFont where
572+ toJSON AdStyleFont{..}
573+ = object
574+ (catMaybes
575+ [("size" .=) <$> _asfSize,
576+ ("family" .=) <$> _asfFamily])
577+
433578--
434579-- /See:/ 'adUnit' smart constructor.
435580data AdUnit = AdUnit
@@ -541,6 +686,37 @@ auuCode = lens _auuCode (\ s a -> s{_auuCode = a})
541686auuId :: Lens' AdUnit (Maybe Text)
542687auuId = lens _auuId (\ s a -> s{_auuId = a})
543688
689+instance FromJSON AdUnit where
690+ parseJSON
691+ = withObject "AdUnit"
692+ (\ o ->
693+ AdUnit <$>
694+ (o .:? "status") <*>
695+ (o .:? "mobileContentAdsSettings")
696+ <*> (o .:? "kind" .!= "adsense#adUnit")
697+ <*> (o .:? "feedAdsSettings")
698+ <*> (o .:? "customStyle")
699+ <*> (o .:? "savedStyleId")
700+ <*> (o .:? "name")
701+ <*> (o .:? "contentAdsSettings")
702+ <*> (o .:? "code")
703+ <*> (o .:? "id"))
704+
705+instance ToJSON AdUnit where
706+ toJSON AdUnit{..}
707+ = object
708+ (catMaybes
709+ [("status" .=) <$> _auuStatus,
710+ ("mobileContentAdsSettings" .=) <$>
711+ _auuMobileContentAdsSettings,
712+ Just ("kind" .= _auuKind),
713+ ("feedAdsSettings" .=) <$> _auuFeedAdsSettings,
714+ ("customStyle" .=) <$> _auuCustomStyle,
715+ ("savedStyleId" .=) <$> _auuSavedStyleId,
716+ ("name" .=) <$> _auuName,
717+ ("contentAdsSettings" .=) <$> _auuContentAdsSettings,
718+ ("code" .=) <$> _auuCode, ("id" .=) <$> _auuId])
719+
544720-- | The backup option to be used in instances where no ad is available.
545721--
546722-- /See:/ 'adUnitBackupOptionContentAdsSettings' smart constructor.
@@ -583,6 +759,23 @@ aubocasType :: Lens' AdUnitBackupOptionContentAdsSettings (Maybe Text)
583759aubocasType
584760 = lens _aubocasType (\ s a -> s{_aubocasType = a})
585761
762+instance FromJSON
763+ AdUnitBackupOptionContentAdsSettings where
764+ parseJSON
765+ = withObject "AdUnitBackupOptionContentAdsSettings"
766+ (\ o ->
767+ AdUnitBackupOptionContentAdsSettings <$>
768+ (o .:? "color") <*> (o .:? "url") <*> (o .:? "type"))
769+
770+instance ToJSON AdUnitBackupOptionContentAdsSettings
771+ where
772+ toJSON AdUnitBackupOptionContentAdsSettings{..}
773+ = object
774+ (catMaybes
775+ [("color" .=) <$> _aubocasColor,
776+ ("url" .=) <$> _aubocasUrl,
777+ ("type" .=) <$> _aubocasType])
778+
586779-- | Settings specific to content ads (AFC) and highend mobile content ads
587780-- (AFMC).
588781--
@@ -627,6 +820,22 @@ aucasType :: Lens' AdUnitContentAdsSettings (Maybe Text)
627820aucasType
628821 = lens _aucasType (\ s a -> s{_aucasType = a})
629822
823+instance FromJSON AdUnitContentAdsSettings where
824+ parseJSON
825+ = withObject "AdUnitContentAdsSettings"
826+ (\ o ->
827+ AdUnitContentAdsSettings <$>
828+ (o .:? "backupOption") <*> (o .:? "size") <*>
829+ (o .:? "type"))
830+
831+instance ToJSON AdUnitContentAdsSettings where
832+ toJSON AdUnitContentAdsSettings{..}
833+ = object
834+ (catMaybes
835+ [("backupOption" .=) <$> _aucasBackupOption,
836+ ("size" .=) <$> _aucasSize,
837+ ("type" .=) <$> _aucasType])
838+
630839-- | Settings specific to feed ads (AFF).
631840--
632841-- /See:/ 'adUnitFeedAdsSettings' smart constructor.
@@ -682,6 +891,24 @@ aufasMinimumWordCount
682891 = lens _aufasMinimumWordCount
683892 (\ s a -> s{_aufasMinimumWordCount = a})
684893
894+instance FromJSON AdUnitFeedAdsSettings where
895+ parseJSON
896+ = withObject "AdUnitFeedAdsSettings"
897+ (\ o ->
898+ AdUnitFeedAdsSettings <$>
899+ (o .:? "frequency") <*> (o .:? "adPosition") <*>
900+ (o .:? "type")
901+ <*> (o .:? "minimumWordCount"))
902+
903+instance ToJSON AdUnitFeedAdsSettings where
904+ toJSON AdUnitFeedAdsSettings{..}
905+ = object
906+ (catMaybes
907+ [("frequency" .=) <$> _aufasFrequency,
908+ ("adPosition" .=) <$> _aufasAdPosition,
909+ ("type" .=) <$> _aufasType,
910+ ("minimumWordCount" .=) <$> _aufasMinimumWordCount])
911+
685912-- | Settings specific to WAP mobile content ads (AFMC).
686913--
687914-- /See:/ 'adUnitMobileContentAdsSettings' smart constructor.
@@ -735,6 +962,26 @@ aumcasType :: Lens' AdUnitMobileContentAdsSettings (Maybe Text)
735962aumcasType
736963 = lens _aumcasType (\ s a -> s{_aumcasType = a})
737964
965+instance FromJSON AdUnitMobileContentAdsSettings
966+ where
967+ parseJSON
968+ = withObject "AdUnitMobileContentAdsSettings"
969+ (\ o ->
970+ AdUnitMobileContentAdsSettings <$>
971+ (o .:? "size") <*> (o .:? "scriptingLanguage") <*>
972+ (o .:? "markupLanguage")
973+ <*> (o .:? "type"))
974+
975+instance ToJSON AdUnitMobileContentAdsSettings where
976+ toJSON AdUnitMobileContentAdsSettings{..}
977+ = object
978+ (catMaybes
979+ [("size" .=) <$> _aumcasSize,
980+ ("scriptingLanguage" .=) <$>
981+ _aumcasScriptingLanguage,
982+ ("markupLanguage" .=) <$> _aumcasMarkupLanguage,
983+ ("type" .=) <$> _aumcasType])
984+
738985--
739986-- /See:/ 'adUnits' smart constructor.
740987data AdUnits = AdUnits
@@ -786,6 +1033,23 @@ auItems
7861033 = lens _auItems (\ s a -> s{_auItems = a}) . _Default
7871034 . _Coerce
7881035
1036+instance FromJSON AdUnits where
1037+ parseJSON
1038+ = withObject "AdUnits"
1039+ (\ o ->
1040+ AdUnits <$>
1041+ (o .:? "etag") <*> (o .:? "nextPageToken") <*>
1042+ (o .:? "kind" .!= "adsense#adUnits")
1043+ <*> (o .:? "items" .!= mempty))
1044+
1045+instance ToJSON AdUnits where
1046+ toJSON AdUnits{..}
1047+ = object
1048+ (catMaybes
1049+ [("etag" .=) <$> _auEtag,
1050+ ("nextPageToken" .=) <$> _auNextPageToken,
1051+ Just ("kind" .= _auKind), ("items" .=) <$> _auItems])
1052+
7891053--
7901054-- /See:/ 'adsenseReportsGenerateResponse' smart constructor.
7911055data AdsenseReportsGenerateResponse = AdsenseReportsGenerateResponse
@@ -901,6 +1165,36 @@ argrTotalMatchedRows
9011165 = lens _argrTotalMatchedRows
9021166 (\ s a -> s{_argrTotalMatchedRows = a})
9031167
1168+instance FromJSON AdsenseReportsGenerateResponse
1169+ where
1170+ parseJSON
1171+ = withObject "AdsenseReportsGenerateResponse"
1172+ (\ o ->
1173+ AdsenseReportsGenerateResponse <$>
1174+ (o .:? "kind" .!= "adsense#report") <*>
1175+ (o .:? "averages" .!= mempty)
1176+ <*> (o .:? "endDate")
1177+ <*> (o .:? "warnings" .!= mempty)
1178+ <*> (o .:? "rows" .!= mempty)
1179+ <*> (o .:? "totals" .!= mempty)
1180+ <*> (o .:? "startDate")
1181+ <*> (o .:? "headers" .!= mempty)
1182+ <*> (o .:? "totalMatchedRows"))
1183+
1184+instance ToJSON AdsenseReportsGenerateResponse where
1185+ toJSON AdsenseReportsGenerateResponse{..}
1186+ = object
1187+ (catMaybes
1188+ [Just ("kind" .= _argrKind),
1189+ ("averages" .=) <$> _argrAverages,
1190+ ("endDate" .=) <$> _argrEndDate,
1191+ ("warnings" .=) <$> _argrWarnings,
1192+ ("rows" .=) <$> _argrRows,
1193+ ("totals" .=) <$> _argrTotals,
1194+ ("startDate" .=) <$> _argrStartDate,
1195+ ("headers" .=) <$> _argrHeaders,
1196+ ("totalMatchedRows" .=) <$> _argrTotalMatchedRows])
1197+
9041198--
9051199-- /See:/ 'adsenseReportsGenerateResponseItemHeaders' smart constructor.
9061200data AdsenseReportsGenerateResponseItemHeaders = AdsenseReportsGenerateResponseItemHeaders
@@ -945,6 +1239,25 @@ argrihType :: Lens' AdsenseReportsGenerateResponseItemHeaders (Maybe Text)
9451239argrihType
9461240 = lens _argrihType (\ s a -> s{_argrihType = a})
9471241
1242+instance FromJSON
1243+ AdsenseReportsGenerateResponseItemHeaders where
1244+ parseJSON
1245+ = withObject
1246+ "AdsenseReportsGenerateResponseItemHeaders"
1247+ (\ o ->
1248+ AdsenseReportsGenerateResponseItemHeaders <$>
1249+ (o .:? "name") <*> (o .:? "currency") <*>
1250+ (o .:? "type"))
1251+
1252+instance ToJSON
1253+ AdsenseReportsGenerateResponseItemHeaders where
1254+ toJSON AdsenseReportsGenerateResponseItemHeaders{..}
1255+ = object
1256+ (catMaybes
1257+ [("name" .=) <$> _argrihName,
1258+ ("currency" .=) <$> _argrihCurrency,
1259+ ("type" .=) <$> _argrihType])
1260+
9481261--
9491262-- /See:/ 'alert' smart constructor.
9501263data Alert = Alert
@@ -1014,6 +1327,28 @@ aleMessage :: Lens' Alert (Maybe Text)
10141327aleMessage
10151328 = lens _aleMessage (\ s a -> s{_aleMessage = a})
10161329
1330+instance FromJSON Alert where
1331+ parseJSON
1332+ = withObject "Alert"
1333+ (\ o ->
1334+ Alert <$>
1335+ (o .:? "isDismissible") <*>
1336+ (o .:? "kind" .!= "adsense#alert")
1337+ <*> (o .:? "severity")
1338+ <*> (o .:? "id")
1339+ <*> (o .:? "type")
1340+ <*> (o .:? "message"))
1341+
1342+instance ToJSON Alert where
1343+ toJSON Alert{..}
1344+ = object
1345+ (catMaybes
1346+ [("isDismissible" .=) <$> _aleIsDismissible,
1347+ Just ("kind" .= _aleKind),
1348+ ("severity" .=) <$> _aleSeverity,
1349+ ("id" .=) <$> _aleId, ("type" .=) <$> _aleType,
1350+ ("message" .=) <$> _aleMessage])
1351+
10171352--
10181353-- /See:/ 'alerts' smart constructor.
10191354data Alerts = Alerts
@@ -1046,6 +1381,21 @@ aaItems
10461381 = lens _aaItems (\ s a -> s{_aaItems = a}) . _Default
10471382 . _Coerce
10481383
1384+instance FromJSON Alerts where
1385+ parseJSON
1386+ = withObject "Alerts"
1387+ (\ o ->
1388+ Alerts <$>
1389+ (o .:? "kind" .!= "adsense#alerts") <*>
1390+ (o .:? "items" .!= mempty))
1391+
1392+instance ToJSON Alerts where
1393+ toJSON Alerts{..}
1394+ = object
1395+ (catMaybes
1396+ [Just ("kind" .= _aaKind),
1397+ ("items" .=) <$> _aaItems])
1398+
10491399--
10501400-- /See:/ 'customChannel' smart constructor.
10511401data CustomChannel = CustomChannel
@@ -1104,6 +1454,25 @@ ccCode = lens _ccCode (\ s a -> s{_ccCode = a})
11041454ccId :: Lens' CustomChannel (Maybe Text)
11051455ccId = lens _ccId (\ s a -> s{_ccId = a})
11061456
1457+instance FromJSON CustomChannel where
1458+ parseJSON
1459+ = withObject "CustomChannel"
1460+ (\ o ->
1461+ CustomChannel <$>
1462+ (o .:? "targetingInfo") <*>
1463+ (o .:? "kind" .!= "adsense#customChannel")
1464+ <*> (o .:? "name")
1465+ <*> (o .:? "code")
1466+ <*> (o .:? "id"))
1467+
1468+instance ToJSON CustomChannel where
1469+ toJSON CustomChannel{..}
1470+ = object
1471+ (catMaybes
1472+ [("targetingInfo" .=) <$> _ccTargetingInfo,
1473+ Just ("kind" .= _ccKind), ("name" .=) <$> _ccName,
1474+ ("code" .=) <$> _ccCode, ("id" .=) <$> _ccId])
1475+
11071476-- | The targeting information of this custom channel, if activated.
11081477--
11091478-- /See:/ 'customChannelTargetingInfo' smart constructor.
@@ -1163,6 +1532,24 @@ cctiDescription
11631532 = lens _cctiDescription
11641533 (\ s a -> s{_cctiDescription = a})
11651534
1535+instance FromJSON CustomChannelTargetingInfo where
1536+ parseJSON
1537+ = withObject "CustomChannelTargetingInfo"
1538+ (\ o ->
1539+ CustomChannelTargetingInfo <$>
1540+ (o .:? "location") <*> (o .:? "siteLanguage") <*>
1541+ (o .:? "adsAppearOn")
1542+ <*> (o .:? "description"))
1543+
1544+instance ToJSON CustomChannelTargetingInfo where
1545+ toJSON CustomChannelTargetingInfo{..}
1546+ = object
1547+ (catMaybes
1548+ [("location" .=) <$> _cctiLocation,
1549+ ("siteLanguage" .=) <$> _cctiSiteLanguage,
1550+ ("adsAppearOn" .=) <$> _cctiAdsAppearOn,
1551+ ("description" .=) <$> _cctiDescription])
1552+
11661553--
11671554-- /See:/ 'customChannels' smart constructor.
11681555data CustomChannels = CustomChannels
@@ -1215,6 +1602,23 @@ cItems
12151602 = lens _cItems (\ s a -> s{_cItems = a}) . _Default .
12161603 _Coerce
12171604
1605+instance FromJSON CustomChannels where
1606+ parseJSON
1607+ = withObject "CustomChannels"
1608+ (\ o ->
1609+ CustomChannels <$>
1610+ (o .:? "etag") <*> (o .:? "nextPageToken") <*>
1611+ (o .:? "kind" .!= "adsense#customChannels")
1612+ <*> (o .:? "items" .!= mempty))
1613+
1614+instance ToJSON CustomChannels where
1615+ toJSON CustomChannels{..}
1616+ = object
1617+ (catMaybes
1618+ [("etag" .=) <$> _cEtag,
1619+ ("nextPageToken" .=) <$> _cNextPageToken,
1620+ Just ("kind" .= _cKind), ("items" .=) <$> _cItems])
1621+
12181622--
12191623-- /See:/ 'metadata' smart constructor.
12201624data Metadata = Metadata
@@ -1246,6 +1650,20 @@ mItems
12461650 = lens _mItems (\ s a -> s{_mItems = a}) . _Default .
12471651 _Coerce
12481652
1653+instance FromJSON Metadata where
1654+ parseJSON
1655+ = withObject "Metadata"
1656+ (\ o ->
1657+ Metadata <$>
1658+ (o .:? "kind" .!= "adsense#metadata") <*>
1659+ (o .:? "items" .!= mempty))
1660+
1661+instance ToJSON Metadata where
1662+ toJSON Metadata{..}
1663+ = object
1664+ (catMaybes
1665+ [Just ("kind" .= _mKind), ("items" .=) <$> _mItems])
1666+
12491667--
12501668-- /See:/ 'payment' smart constructor.
12511669data Payment = Payment
@@ -1306,6 +1724,28 @@ pPaymentAmount
13061724 = lens _pPaymentAmount
13071725 (\ s a -> s{_pPaymentAmount = a})
13081726
1727+instance FromJSON Payment where
1728+ parseJSON
1729+ = withObject "Payment"
1730+ (\ o ->
1731+ Payment <$>
1732+ (o .:? "paymentAmountCurrencyCode") <*>
1733+ (o .:? "kind" .!= "adsense#payment")
1734+ <*> (o .:? "paymentDate")
1735+ <*> (o .:? "id")
1736+ <*> (o .:? "paymentAmount"))
1737+
1738+instance ToJSON Payment where
1739+ toJSON Payment{..}
1740+ = object
1741+ (catMaybes
1742+ [("paymentAmountCurrencyCode" .=) <$>
1743+ _pPaymentAmountCurrencyCode,
1744+ Just ("kind" .= _pKind),
1745+ ("paymentDate" .=) <$> _pPaymentDate,
1746+ ("id" .=) <$> _pId,
1747+ ("paymentAmount" .=) <$> _pPaymentAmount])
1748+
13091749--
13101750-- /See:/ 'payments' smart constructor.
13111751data Payments = Payments
@@ -1340,6 +1780,21 @@ payItems
13401780 _Default
13411781 . _Coerce
13421782
1783+instance FromJSON Payments where
1784+ parseJSON
1785+ = withObject "Payments"
1786+ (\ o ->
1787+ Payments <$>
1788+ (o .:? "kind" .!= "adsense#payments") <*>
1789+ (o .:? "items" .!= mempty))
1790+
1791+instance ToJSON Payments where
1792+ toJSON Payments{..}
1793+ = object
1794+ (catMaybes
1795+ [Just ("kind" .= _payKind),
1796+ ("items" .=) <$> _payItems])
1797+
13431798--
13441799-- /See:/ 'reportingMetadataEntry' smart constructor.
13451800data ReportingMetadataEntry = ReportingMetadataEntry
@@ -1441,6 +1896,32 @@ rmeSupportedProducts
14411896 . _Default
14421897 . _Coerce
14431898
1899+instance FromJSON ReportingMetadataEntry where
1900+ parseJSON
1901+ = withObject "ReportingMetadataEntry"
1902+ (\ o ->
1903+ ReportingMetadataEntry <$>
1904+ (o .:? "kind" .!= "adsense#reportingMetadataEntry")
1905+ <*> (o .:? "requiredMetrics" .!= mempty)
1906+ <*> (o .:? "compatibleMetrics" .!= mempty)
1907+ <*> (o .:? "requiredDimensions" .!= mempty)
1908+ <*> (o .:? "id")
1909+ <*> (o .:? "compatibleDimensions" .!= mempty)
1910+ <*> (o .:? "supportedProducts" .!= mempty))
1911+
1912+instance ToJSON ReportingMetadataEntry where
1913+ toJSON ReportingMetadataEntry{..}
1914+ = object
1915+ (catMaybes
1916+ [Just ("kind" .= _rmeKind),
1917+ ("requiredMetrics" .=) <$> _rmeRequiredMetrics,
1918+ ("compatibleMetrics" .=) <$> _rmeCompatibleMetrics,
1919+ ("requiredDimensions" .=) <$> _rmeRequiredDimensions,
1920+ ("id" .=) <$> _rmeId,
1921+ ("compatibleDimensions" .=) <$>
1922+ _rmeCompatibleDimensions,
1923+ ("supportedProducts" .=) <$> _rmeSupportedProducts])
1924+
14441925--
14451926-- /See:/ 'savedAdStyle' smart constructor.
14461927data SavedAdStyle = SavedAdStyle
@@ -1489,6 +1970,23 @@ sAdStyle = lens _sAdStyle (\ s a -> s{_sAdStyle = a})
14891970sId :: Lens' SavedAdStyle (Maybe Text)
14901971sId = lens _sId (\ s a -> s{_sId = a})
14911972
1973+instance FromJSON SavedAdStyle where
1974+ parseJSON
1975+ = withObject "SavedAdStyle"
1976+ (\ o ->
1977+ SavedAdStyle <$>
1978+ (o .:? "kind" .!= "adsense#savedAdStyle") <*>
1979+ (o .:? "name")
1980+ <*> (o .:? "adStyle")
1981+ <*> (o .:? "id"))
1982+
1983+instance ToJSON SavedAdStyle where
1984+ toJSON SavedAdStyle{..}
1985+ = object
1986+ (catMaybes
1987+ [Just ("kind" .= _sKind), ("name" .=) <$> _sName,
1988+ ("adStyle" .=) <$> _sAdStyle, ("id" .=) <$> _sId])
1989+
14921990--
14931991-- /See:/ 'savedAdStyles' smart constructor.
14941992data SavedAdStyles = SavedAdStyles
@@ -1541,6 +2039,24 @@ sasItems
15412039 _Default
15422040 . _Coerce
15432041
2042+instance FromJSON SavedAdStyles where
2043+ parseJSON
2044+ = withObject "SavedAdStyles"
2045+ (\ o ->
2046+ SavedAdStyles <$>
2047+ (o .:? "etag") <*> (o .:? "nextPageToken") <*>
2048+ (o .:? "kind" .!= "adsense#savedAdStyles")
2049+ <*> (o .:? "items" .!= mempty))
2050+
2051+instance ToJSON SavedAdStyles where
2052+ toJSON SavedAdStyles{..}
2053+ = object
2054+ (catMaybes
2055+ [("etag" .=) <$> _sasEtag,
2056+ ("nextPageToken" .=) <$> _sasNextPageToken,
2057+ Just ("kind" .= _sasKind),
2058+ ("items" .=) <$> _sasItems])
2059+
15442060--
15452061-- /See:/ 'savedReport' smart constructor.
15462062data SavedReport = SavedReport
@@ -1579,6 +2095,22 @@ savName = lens _savName (\ s a -> s{_savName = a})
15792095savId :: Lens' SavedReport (Maybe Text)
15802096savId = lens _savId (\ s a -> s{_savId = a})
15812097
2098+instance FromJSON SavedReport where
2099+ parseJSON
2100+ = withObject "SavedReport"
2101+ (\ o ->
2102+ SavedReport <$>
2103+ (o .:? "kind" .!= "adsense#savedReport") <*>
2104+ (o .:? "name")
2105+ <*> (o .:? "id"))
2106+
2107+instance ToJSON SavedReport where
2108+ toJSON SavedReport{..}
2109+ = object
2110+ (catMaybes
2111+ [Just ("kind" .= _savKind), ("name" .=) <$> _savName,
2112+ ("id" .=) <$> _savId])
2113+
15822114--
15832115-- /See:/ 'savedReports' smart constructor.
15842116data SavedReports = SavedReports
@@ -1631,6 +2163,23 @@ srItems
16312163 = lens _srItems (\ s a -> s{_srItems = a}) . _Default
16322164 . _Coerce
16332165
2166+instance FromJSON SavedReports where
2167+ parseJSON
2168+ = withObject "SavedReports"
2169+ (\ o ->
2170+ SavedReports <$>
2171+ (o .:? "etag") <*> (o .:? "nextPageToken") <*>
2172+ (o .:? "kind" .!= "adsense#savedReports")
2173+ <*> (o .:? "items" .!= mempty))
2174+
2175+instance ToJSON SavedReports where
2176+ toJSON SavedReports{..}
2177+ = object
2178+ (catMaybes
2179+ [("etag" .=) <$> _srEtag,
2180+ ("nextPageToken" .=) <$> _srNextPageToken,
2181+ Just ("kind" .= _srKind), ("items" .=) <$> _srItems])
2182+
16342183--
16352184-- /See:/ 'urlChannel' smart constructor.
16362185data UrlChannel = UrlChannel
@@ -1673,6 +2222,22 @@ ucUrlPattern :: Lens' UrlChannel (Maybe Text)
16732222ucUrlPattern
16742223 = lens _ucUrlPattern (\ s a -> s{_ucUrlPattern = a})
16752224
2225+instance FromJSON UrlChannel where
2226+ parseJSON
2227+ = withObject "UrlChannel"
2228+ (\ o ->
2229+ UrlChannel <$>
2230+ (o .:? "kind" .!= "adsense#urlChannel") <*>
2231+ (o .:? "id")
2232+ <*> (o .:? "urlPattern"))
2233+
2234+instance ToJSON UrlChannel where
2235+ toJSON UrlChannel{..}
2236+ = object
2237+ (catMaybes
2238+ [Just ("kind" .= _ucKind), ("id" .=) <$> _ucId,
2239+ ("urlPattern" .=) <$> _ucUrlPattern])
2240+
16762241--
16772242-- /See:/ 'urlChannels' smart constructor.
16782243data UrlChannels = UrlChannels
@@ -1725,3 +2290,21 @@ urlcItems
17252290 = lens _urlcItems (\ s a -> s{_urlcItems = a}) .
17262291 _Default
17272292 . _Coerce
2293+
2294+instance FromJSON UrlChannels where
2295+ parseJSON
2296+ = withObject "UrlChannels"
2297+ (\ o ->
2298+ UrlChannels <$>
2299+ (o .:? "etag") <*> (o .:? "nextPageToken") <*>
2300+ (o .:? "kind" .!= "adsense#urlChannels")
2301+ <*> (o .:? "items" .!= mempty))
2302+
2303+instance ToJSON UrlChannels where
2304+ toJSON UrlChannels{..}
2305+ = object
2306+ (catMaybes
2307+ [("etag" .=) <$> _urlcEtag,
2308+ ("nextPageToken" .=) <$> _urlcNextPageToken,
2309+ Just ("kind" .= _urlcKind),
2310+ ("items" .=) <$> _urlcItems])
gogol-affiliates/gen/Network/Google/Affiliates.hs+195−160
@@ -311,45 +311,50 @@ type ReportsAPI = ReportsGet
311311
312312-- | Retrieves a report of the specified type.
313313type ReportsGet =
314− "gan" :> "v1beta1" :> Capture "role" Text :>
315− Capture "roleId" Text
316− :> "report"
317− :> Capture "reportType" Text
318− :> QueryParam "status" Text
319− :> QueryParam "quotaUser" Text
320− :> QueryParam "prettyPrint" Bool
321− :> QueryParam "userIp" Text
322− :> QueryParam "advertiserId" Text
323− :> QueryParam "endDate" Text
324− :> QueryParam "eventType" Text
325− :> QueryParam "startDate" Text
326− :> QueryParam "key" Text
327− :> QueryParam "calculateTotals" Bool
328− :> QueryParam "linkId" Text
329− :> QueryParam "oauth_token" Text
330− :> QueryParam "orderId" Text
331− :> QueryParam "publisherId" Text
332− :> QueryParam "startIndex" Word32
333− :> QueryParam "maxResults" Word32
334− :> QueryParam "fields" Text
335− :> QueryParam "alt" Text
314+ "gan" :>
315+ "v1beta1" :>
316+ Capture "role" Text :>
317+ Capture "roleId" Text :>
318+ "report" :>
319+ Capture "reportType" Text :>
320+ QueryParam "status" Text :>
321+ QueryParam "quotaUser" Text :>
322+ QueryParam "prettyPrint" Bool :>
323+ QueryParam "userIp" Text :>
324+ QueryParam "advertiserId" Text :>
325+ QueryParam "endDate" Text :>
326+ QueryParam "eventType" Text :>
327+ QueryParam "startDate" Text :>
328+ QueryParam "key" Text :>
329+ QueryParam "calculateTotals" Bool :>
330+ QueryParam "linkId" Text :>
331+ QueryParam "oauth_token" Text :>
332+ QueryParam "orderId" Text :>
333+ QueryParam "publisherId" Text :>
334+ QueryParam "startIndex" Word32 :>
335+ QueryParam "maxResults" Word32 :>
336+ QueryParam "fields" Text :>
337+ QueryParam "alt" Text :>
338+ Get '[JSON] Report
336339
337340type CcOffersAPI = CcOffersList
338341
339342-- | Retrieves credit card offers for the given publisher.
340343type CcOffersList =
341− "gan" :> "v1beta1" :> "publishers" :>
342− Capture "publisher" Text
343− :> "ccOffers"
344− :> QueryParam "quotaUser" Text
345− :> QueryParam "prettyPrint" Bool
346− :> QueryParam "userIp" Text
347− :> QueryParam "key" Text
348− :> QueryParam "advertiser" Text
349− :> QueryParam "projection" Text
350− :> QueryParam "oauth_token" Text
351− :> QueryParam "fields" Text
352− :> QueryParam "alt" Text
344+ "gan" :>
345+ "v1beta1" :>
346+ "publishers" :>
347+ Capture "publisher" Text :>
348+ "ccOffers" :>
349+ QueryParam "quotaUser" Text :>
350+ QueryParam "prettyPrint" Bool :>
351+ QueryParam "userIp" Text :>
352+ QueryParam "key" Text :>
353+ QueryParam "advertiser" Text :>
354+ QueryParam "projection" Text :>
355+ QueryParam "oauth_token" Text :>
356+ QueryParam "fields" Text :>
357+ QueryParam "alt" Text :> Get '[JSON] CcOffers
353358
354359type AdvertisersAPI =
355360 AdvertisersList :<|> AdvertisersGet
@@ -357,71 +362,88 @@ type AdvertisersAPI =
357362-- | Retrieves data about all advertisers that the requesting
358363-- advertiser\/publisher has access to.
359364type AdvertisersList =
360− "gan" :> "v1beta1" :> Capture "role" Text :>
361− Capture "roleId" Text
362− :> "advertisers"
363− :> QueryParam "quotaUser" Text
364− :> QueryParam "prettyPrint" Bool
365− :> QueryParam "userIp" Text
366− :> QueryParam "relationshipStatus" Text
367− :> QueryParam "minSevenDayEpc" Double
368− :> QueryParam "minNinetyDayEpc" Double
369− :> QueryParam "key" Text
370− :> QueryParam "minPayoutRank" Natural
371− :> QueryParam "advertiserCategory" Text
372− :> QueryParam "pageToken" Text
373− :> QueryParam "oauth_token" Text
374− :> QueryParam "maxResults" Word32
375− :> QueryParam "fields" Text
376− :> QueryParam "alt" Text
365+ "gan" :>
366+ "v1beta1" :>
367+ Capture "role" Text :>
368+ Capture "roleId" Text :>
369+ "advertisers" :>
370+ QueryParam "quotaUser" Text :>
371+ QueryParam "prettyPrint" Bool :>
372+ QueryParam "userIp" Text :>
373+ QueryParam "relationshipStatus" Text :>
374+ QueryParam "minSevenDayEpc" Double :>
375+ QueryParam "minNinetyDayEpc" Double :>
376+ QueryParam "key" Text :>
377+ QueryParam "minPayoutRank" Natural :>
378+ QueryParam "advertiserCategory" Text :>
379+ QueryParam "pageToken" Text :>
380+ QueryParam "oauth_token" Text :>
381+ QueryParam "maxResults" Word32 :>
382+ QueryParam "fields" Text :>
383+ QueryParam "alt" Text :>
384+ Get '[JSON] Advertisers
377385
378386-- | Retrieves data about a single advertiser if that the requesting
379387-- advertiser\/publisher has access to it. Only publishers can lookup
380388-- advertisers. Advertisers can request information about themselves by
381389-- omitting the advertiserId query parameter.
382390type AdvertisersGet =
383− "gan" :> "v1beta1" :> Capture "role" Text :>
384− Capture "roleId" Text
385− :> "advertiser"
386− :> QueryParam "quotaUser" Text
387− :> QueryParam "prettyPrint" Bool
388− :> QueryParam "userIp" Text
389− :> QueryParam "advertiserId" Text
390− :> QueryParam "key" Text
391− :> QueryParam "oauth_token" Text
392− :> QueryParam "fields" Text
393− :> QueryParam "alt" Text
391+ "gan" :>
392+ "v1beta1" :>
393+ Capture "role" Text :>
394+ Capture "roleId" Text :>
395+ "advertiser" :>
396+ QueryParam "quotaUser" Text :>
397+ QueryParam "prettyPrint" Bool :>
398+ QueryParam "userIp" Text :>
399+ QueryParam "advertiserId" Text :>
400+ QueryParam "key" Text :>
401+ QueryParam "oauth_token" Text :>
402+ QueryParam "fields" Text :>
403+ QueryParam "alt" Text :> Get '[JSON] Advertiser
394404
395405type EventsAPI = EventsList
396406
397407-- | Retrieves event data for a given advertiser\/publisher.
398408type EventsList =
399− "gan" :> "v1beta1" :> Capture "role" Text :>
400− Capture "roleId" Text
401− :> "events"
402− :> QueryParam "status" Text
403− :> QueryParam "quotaUser" Text
404− :> QueryParam "prettyPrint" Bool
405− :> QueryParam "eventDateMin" Text
406− :> QueryParam "chargeType" Text
407− :> QueryParam "memberId" Text
408− :> QueryParam "userIp" Text
409− :> QueryParam "modifyDateMax" Text
410− :> QueryParam "advertiserId" Text
411− :> QueryParam "modifyDateMin" Text
412− :> QueryParam "eventDateMax" Text
413− :> QueryParam "key" Text
414− :> QueryParam "sku" Text
415− :> QueryParam "linkId" Text
416− :> QueryParam "pageToken" Text
417− :> QueryParam "type" Text
418− :> QueryParam "oauth_token" Text
419− :> QueryParam "orderId" Text
420− :> QueryParam "publisherId" Text
421− :> QueryParam "productCategory" Text
422− :> QueryParam "maxResults" Word32
423− :> QueryParam "fields" Text
424− :> QueryParam "alt" Text
409+ "gan" :>
410+ "v1beta1" :>
411+ Capture "role" Text :>
412+ Capture "roleId" Text :>
413+ "events" :>
414+ QueryParam "status" Text :>
415+ QueryParam "quotaUser" Text :>
416+ QueryParam "prettyPrint" Bool :>
417+ QueryParam "eventDateMin" Text :>
418+ QueryParam "chargeType" Text :>
419+ QueryParam "memberId" Text :>
420+ QueryParam "userIp" Text :>
421+ QueryParam "modifyDateMax" Text :>
422+ QueryParam "advertiserId" Text :>
423+ QueryParam "modifyDateMin" Text :>
424+ QueryParam "eventDateMax" Text :>
425+ QueryParam "key" Text :>
426+ QueryParam "sku" Text :>
427+ QueryParam "linkId" Text :>
428+ QueryParam "pageToken" Text :>
429+ QueryParam "type" Text :>
430+ QueryParam "oauth_token" Text :>
431+ QueryParam "orderId" Text :>
432+ QueryParam "publisherId" Text
433+ :>
434+ QueryParam
435+ "productCategory"
436+ Text
437+ :>
438+ QueryParam "maxResults"
439+ Word32
440+ :>
441+ QueryParam "fields"
442+ Text
443+ :>
444+ QueryParam "alt" Text
445+ :>
446+ Get '[JSON] Events
425447
426448type PublishersAPI =
427449 PublishersList :<|> PublishersGet
@@ -429,96 +451,109 @@ type PublishersAPI =
429451-- | Retrieves data about all publishers that the requesting
430452-- advertiser\/publisher has access to.
431453type PublishersList =
432− "gan" :> "v1beta1" :> Capture "role" Text :>
433− Capture "roleId" Text
434− :> "publishers"
435− :> QueryParam "quotaUser" Text
436− :> QueryParam "prettyPrint" Bool
437− :> QueryParam "userIp" Text
438− :> QueryParam "relationshipStatus" Text
439− :> QueryParam "minSevenDayEpc" Double
440− :> QueryParam "minNinetyDayEpc" Double
441− :> QueryParam "key" Text
442− :> QueryParam "minPayoutRank" Natural
443− :> QueryParam "pageToken" Text
444− :> QueryParam "oauth_token" Text
445− :> QueryParam "publisherCategory" Text
446− :> QueryParam "maxResults" Word32
447− :> QueryParam "fields" Text
448− :> QueryParam "alt" Text
454+ "gan" :>
455+ "v1beta1" :>
456+ Capture "role" Text :>
457+ Capture "roleId" Text :>
458+ "publishers" :>
459+ QueryParam "quotaUser" Text :>
460+ QueryParam "prettyPrint" Bool :>
461+ QueryParam "userIp" Text :>
462+ QueryParam "relationshipStatus" Text :>
463+ QueryParam "minSevenDayEpc" Double :>
464+ QueryParam "minNinetyDayEpc" Double :>
465+ QueryParam "key" Text :>
466+ QueryParam "minPayoutRank" Natural :>
467+ QueryParam "pageToken" Text :>
468+ QueryParam "oauth_token" Text :>
469+ QueryParam "publisherCategory" Text :>
470+ QueryParam "maxResults" Word32 :>
471+ QueryParam "fields" Text :>
472+ QueryParam "alt" Text :>
473+ Get '[JSON] Publishers
449474
450475-- | Retrieves data about a single advertiser if that the requesting
451476-- advertiser\/publisher has access to it. Only advertisers can look up
452477-- publishers. Publishers can request information about themselves by
453478-- omitting the publisherId query parameter.
454479type PublishersGet =
455− "gan" :> "v1beta1" :> Capture "role" Text :>
456− Capture "roleId" Text
457− :> "publisher"
458− :> QueryParam "quotaUser" Text
459− :> QueryParam "prettyPrint" Bool
460− :> QueryParam "userIp" Text
461− :> QueryParam "key" Text
462− :> QueryParam "oauth_token" Text
463− :> QueryParam "publisherId" Text
464− :> QueryParam "fields" Text
465− :> QueryParam "alt" Text
480+ "gan" :>
481+ "v1beta1" :>
482+ Capture "role" Text :>
483+ Capture "roleId" Text :>
484+ "publisher" :>
485+ QueryParam "quotaUser" Text :>
486+ QueryParam "prettyPrint" Bool :>
487+ QueryParam "userIp" Text :>
488+ QueryParam "key" Text :>
489+ QueryParam "oauth_token" Text :>
490+ QueryParam "publisherId" Text :>
491+ QueryParam "fields" Text :>
492+ QueryParam "alt" Text :> Get '[JSON] Publisher
466493
467494type LinksAPI =
468495 LinksInsert :<|> LinksList :<|> LinksGet
469496
470497-- | Inserts a new link.
471498type LinksInsert =
472− "gan" :> "v1beta1" :> Capture "role" Text :>
473− Capture "roleId" Text
474− :> "link"
475− :> QueryParam "quotaUser" Text
476− :> QueryParam "prettyPrint" Bool
477− :> QueryParam "userIp" Text
478− :> QueryParam "key" Text
479− :> QueryParam "oauth_token" Text
480− :> QueryParam "fields" Text
481− :> QueryParam "alt" Text
499+ "gan" :>
500+ "v1beta1" :>
501+ Capture "role" Text :>
502+ Capture "roleId" Text :>
503+ "link" :>
504+ QueryParam "quotaUser" Text :>
505+ QueryParam "prettyPrint" Bool :>
506+ QueryParam "userIp" Text :>
507+ QueryParam "key" Text :>
508+ QueryParam "oauth_token" Text :>
509+ QueryParam "fields" Text :>
510+ QueryParam "alt" Text :> Post '[JSON] Link
482511
483512-- | Retrieves all links that match the query parameters.
484513type LinksList =
485− "gan" :> "v1beta1" :> Capture "role" Text :>
486− Capture "roleId" Text
487− :> "links"
488− :> QueryParam "createDateMax" Text
489− :> QueryParam "authorship" Text
490− :> QueryParam "quotaUser" Text
491− :> QueryParam "prettyPrint" Bool
492− :> QueryParam "assetSize" Text
493− :> QueryParam "userIp" Text
494− :> QueryParam "relationshipStatus" Text
495− :> QueryParam "advertiserId" Int64
496− :> QueryParam "searchText" Text
497− :> QueryParam "promotionType" Text
498− :> QueryParam "key" Text
499− :> QueryParam "createDateMin" Text
500− :> QueryParam "linkType" Text
501− :> QueryParam "pageToken" Text
502− :> QueryParam "startDateMax" Text
503− :> QueryParam "oauth_token" Text
504− :> QueryParam "startDateMin" Text
505− :> QueryParam "maxResults" Word32
506− :> QueryParam "fields" Text
507− :> QueryParam "alt" Text
514+ "gan" :>
515+ "v1beta1" :>
516+ Capture "role" Text :>
517+ Capture "roleId" Text :>
518+ "links" :>
519+ QueryParam "createDateMax" Text :>
520+ QueryParam "authorship" Text :>
521+ QueryParam "quotaUser" Text :>
522+ QueryParam "prettyPrint" Bool :>
523+ QueryParam "assetSize" Text :>
524+ QueryParam "userIp" Text :>
525+ QueryParam "relationshipStatus" Text :>
526+ QueryParam "advertiserId" Int64 :>
527+ QueryParam "searchText" Text :>
528+ QueryParam "promotionType" Text :>
529+ QueryParam "key" Text :>
530+ QueryParam "createDateMin" Text :>
531+ QueryParam "linkType" Text :>
532+ QueryParam "pageToken" Text :>
533+ QueryParam "startDateMax" Text :>
534+ QueryParam "oauth_token" Text :>
535+ QueryParam "startDateMin" Text :>
536+ QueryParam "maxResults" Word32
537+ :>
538+ QueryParam "fields" Text :>
539+ QueryParam "alt" Text :>
540+ Get '[JSON] Links
508541
509542-- | Retrieves data about a single link if the requesting
510543-- advertiser\/publisher has access to it. Advertisers can look up their
511544-- own links. Publishers can look up visible links or links belonging to
512545-- advertisers they are in a relationship with.
513546type LinksGet =
514− "gan" :> "v1beta1" :> Capture "role" Text :>
515− Capture "roleId" Text
516− :> "link"
517− :> Capture "linkId" Int64
518− :> QueryParam "quotaUser" Text
519− :> QueryParam "prettyPrint" Bool
520− :> QueryParam "userIp" Text
521− :> QueryParam "key" Text
522− :> QueryParam "oauth_token" Text
523− :> QueryParam "fields" Text
524− :> QueryParam "alt" Text
547+ "gan" :>
548+ "v1beta1" :>
549+ Capture "role" Text :>
550+ Capture "roleId" Text :>
551+ "link" :>
552+ Capture "linkId" Int64 :>
553+ QueryParam "quotaUser" Text :>
554+ QueryParam "prettyPrint" Bool :>
555+ QueryParam "userIp" Text :>
556+ QueryParam "key" Text :>
557+ QueryParam "oauth_token" Text :>
558+ QueryParam "fields" Text :>
559+ QueryParam "alt" Text :> Get '[JSON] Link
gogol-affiliates/gen/Network/Google/Affiliates/Types/Product.hs+572
@@ -1,6 +1,7 @@
11{-# LANGUAGE DeriveDataTypeable #-}
22{-# LANGUAGE DeriveGeneric #-}
33{-# LANGUAGE OverloadedStrings #-}
4+{-# LANGUAGE RecordWildCards #-}
45
56{-# OPTIONS_GHC -fno-warn-unused-imports #-}
67
@@ -238,6 +239,59 @@ aDescription :: Lens' Advertiser (Maybe Text)
238239aDescription
239240 = lens _aDescription (\ s a -> s{_aDescription = a})
240241
242+instance FromJSON Advertiser where
243+ parseJSON
244+ = withObject "Advertiser"
245+ (\ o ->
246+ Advertiser <$>
247+ (o .:? "allowPublisherCreatedLinks") <*>
248+ (o .:? "contactPhone")
249+ <*> (o .:? "contactEmail")
250+ <*> (o .:? "status")
251+ <*> (o .:? "logoUrl")
252+ <*> (o .:? "kind" .!= "gan#advertiser")
253+ <*> (o .:? "category")
254+ <*> (o .:? "siteUrl")
255+ <*> (o .:? "payoutRank")
256+ <*> (o .:? "joinDate")
257+ <*> (o .:? "defaultLinkId")
258+ <*> (o .:? "redirectDomains" .!= mempty)
259+ <*> (o .:? "name")
260+ <*> (o .:? "productFeedsEnabled")
261+ <*> (o .:? "merchantCenterIds" .!= mempty)
262+ <*> (o .:? "epcSevenDayAverage")
263+ <*> (o .:? "item")
264+ <*> (o .:? "id")
265+ <*> (o .:? "epcNinetyDayAverage")
266+ <*> (o .:? "commissionDuration")
267+ <*> (o .:? "description"))
268+
269+instance ToJSON Advertiser where
270+ toJSON Advertiser{..}
271+ = object
272+ (catMaybes
273+ [("allowPublisherCreatedLinks" .=) <$>
274+ _aAllowPublisherCreatedLinks,
275+ ("contactPhone" .=) <$> _aContactPhone,
276+ ("contactEmail" .=) <$> _aContactEmail,
277+ ("status" .=) <$> _aStatus,
278+ ("logoUrl" .=) <$> _aLogoUrl,
279+ Just ("kind" .= _aKind),
280+ ("category" .=) <$> _aCategory,
281+ ("siteUrl" .=) <$> _aSiteUrl,
282+ ("payoutRank" .=) <$> _aPayoutRank,
283+ ("joinDate" .=) <$> _aJoinDate,
284+ ("defaultLinkId" .=) <$> _aDefaultLinkId,
285+ ("redirectDomains" .=) <$> _aRedirectDomains,
286+ ("name" .=) <$> _aName,
287+ ("productFeedsEnabled" .=) <$> _aProductFeedsEnabled,
288+ ("merchantCenterIds" .=) <$> _aMerchantCenterIds,
289+ ("epcSevenDayAverage" .=) <$> _aEpcSevenDayAverage,
290+ ("item" .=) <$> _aItem, ("id" .=) <$> _aId,
291+ ("epcNinetyDayAverage" .=) <$> _aEpcNinetyDayAverage,
292+ ("commissionDuration" .=) <$> _aCommissionDuration,
293+ ("description" .=) <$> _aDescription])
294+
241295--
242296-- /See:/ 'advertisers' smart constructor.
243297data Advertisers = Advertisers
@@ -282,6 +336,23 @@ advItems
282336 _Default
283337 . _Coerce
284338
339+instance FromJSON Advertisers where
340+ parseJSON
341+ = withObject "Advertisers"
342+ (\ o ->
343+ Advertisers <$>
344+ (o .:? "nextPageToken") <*>
345+ (o .:? "kind" .!= "gan#advertisers")
346+ <*> (o .:? "items" .!= mempty))
347+
348+instance ToJSON Advertisers where
349+ toJSON Advertisers{..}
350+ = object
351+ (catMaybes
352+ [("nextPageToken" .=) <$> _advNextPageToken,
353+ Just ("kind" .= _advKind),
354+ ("items" .=) <$> _advItems])
355+
285356-- | A credit card offer. There are many possible result fields. We provide
286357-- two different views of the data, or \"projections.\" The \"full\"
287358-- projection includes every result field. And the \"summary\" projection,
@@ -965,6 +1036,162 @@ coPurchaseRateType
9651036 = lens _coPurchaseRateType
9661037 (\ s a -> s{_coPurchaseRateType = a})
9671038
1039+instance FromJSON CcOffer where
1040+ parseJSON
1041+ = withObject "CcOffer"
1042+ (\ o ->
1043+ CcOffer <$>
1044+ (o .:? "minimumFinanceCharge") <*>
1045+ (o .:? "trackingUrl")
1046+ <*> (o .:? "prohibitedCategories" .!= mempty)
1047+ <*> (o .:? "balanceComputationMethod")
1048+ <*> (o .:? "initialSetupAndProcessingFee")
1049+ <*> (o .:? "returnedPaymentFee")
1050+ <*> (o .:? "ageMinimumDetails")
1051+ <*> (o .:? "variableRatesUpdateFrequency")
1052+ <*> (o .:? "creditLimitMin")
1053+ <*> (o .:? "travelInsurance")
1054+ <*> (o .:? "approvedCategories" .!= mempty)
1055+ <*> (o .:? "annualFeeDisplay")
1056+ <*> (o .:? "overLimitFee")
1057+ <*> (o .:? "maxPurchaseRate")
1058+ <*> (o .:? "ageMinimum")
1059+ <*> (o .:? "variableRatesLastUpdated")
1060+ <*> (o .:? "introCashAdvanceTerms")
1061+ <*> (o .:? "issuerWebsite")
1062+ <*> (o .:? "luggageInsurance")
1063+ <*> (o .:? "kind" .!= "gan#ccOffer")
1064+ <*> (o .:? "rewardsHaveBlackoutDates")
1065+ <*> (o .:? "disclaimer")
1066+ <*> (o .:? "additionalCardHolderFee")
1067+ <*> (o .:? "existingCustomerOnly")
1068+ <*> (o .:? "emergencyInsurance")
1069+ <*> (o .:? "network")
1070+ <*> (o .:? "cashAdvanceTerms")
1071+ <*> (o .:? "statementCopyFee")
1072+ <*> (o .:? "aprDisplay")
1073+ <*> (o .:? "offersImmediateCashReward")
1074+ <*> (o .:? "rewards" .!= mempty)
1075+ <*> (o .:? "cardType")
1076+ <*> (o .:? "imageUrl")
1077+ <*> (o .:? "creditLimitMax")
1078+ <*> (o .:? "landingPageUrl")
1079+ <*> (o .:? "annualFee")
1080+ <*> (o .:? "rewardsExpire")
1081+ <*> (o .:? "firstYearAnnualFee")
1082+ <*> (o .:? "carRentalInsurance")
1083+ <*> (o .:? "purchaseRateAdditionalDetails")
1084+ <*> (o .:? "offerId")
1085+ <*> (o .:? "gracePeriodDisplay")
1086+ <*> (o .:? "introPurchaseTerms")
1087+ <*> (o .:? "creditRatingDisplay")
1088+ <*> (o .:? "balanceTransferTerms")
1089+ <*> (o .:? "latePaymentFee")
1090+ <*> (o .:? "cardBenefits" .!= mempty)
1091+ <*> (o .:? "issuer")
1092+ <*> (o .:? "cardName")
1093+ <*> (o .:? "minPurchaseRate")
1094+ <*> (o .:? "fraudLiability")
1095+ <*> (o .:? "foreignCurrencyTransactionFee")
1096+ <*> (o .:? "extendedWarranty")
1097+ <*> (o .:? "annualRewardMaximum")
1098+ <*> (o .:? "issuerId")
1099+ <*> (o .:? "introBalanceTransferTerms")
1100+ <*> (o .:? "defaultFees" .!= mempty)
1101+ <*> (o .:? "additionalCardBenefits" .!= mempty)
1102+ <*> (o .:? "rewardUnit")
1103+ <*> (o .:? "bonusRewards" .!= mempty)
1104+ <*> (o .:? "flightAccidentInsurance")
1105+ <*> (o .:? "rewardPartner")
1106+ <*> (o .:? "purchaseRateType"))
1107+
1108+instance ToJSON CcOffer where
1109+ toJSON CcOffer{..}
1110+ = object
1111+ (catMaybes
1112+ [("minimumFinanceCharge" .=) <$>
1113+ _coMinimumFinanceCharge,
1114+ ("trackingUrl" .=) <$> _coTrackingUrl,
1115+ ("prohibitedCategories" .=) <$>
1116+ _coProhibitedCategories,
1117+ ("balanceComputationMethod" .=) <$>
1118+ _coBalanceComputationMethod,
1119+ ("initialSetupAndProcessingFee" .=) <$>
1120+ _coInitialSetupAndProcessingFee,
1121+ ("returnedPaymentFee" .=) <$> _coReturnedPaymentFee,
1122+ ("ageMinimumDetails" .=) <$> _coAgeMinimumDetails,
1123+ ("variableRatesUpdateFrequency" .=) <$>
1124+ _coVariableRatesUpdateFrequency,
1125+ ("creditLimitMin" .=) <$> _coCreditLimitMin,
1126+ ("travelInsurance" .=) <$> _coTravelInsurance,
1127+ ("approvedCategories" .=) <$> _coApprovedCategories,
1128+ ("annualFeeDisplay" .=) <$> _coAnnualFeeDisplay,
1129+ ("overLimitFee" .=) <$> _coOverLimitFee,
1130+ ("maxPurchaseRate" .=) <$> _coMaxPurchaseRate,
1131+ ("ageMinimum" .=) <$> _coAgeMinimum,
1132+ ("variableRatesLastUpdated" .=) <$>
1133+ _coVariableRatesLastUpdated,
1134+ ("introCashAdvanceTerms" .=) <$>
1135+ _coIntroCashAdvanceTerms,
1136+ ("issuerWebsite" .=) <$> _coIssuerWebsite,
1137+ ("luggageInsurance" .=) <$> _coLuggageInsurance,
1138+ Just ("kind" .= _coKind),
1139+ ("rewardsHaveBlackoutDates" .=) <$>
1140+ _coRewardsHaveBlackoutDates,
1141+ ("disclaimer" .=) <$> _coDisclaimer,
1142+ ("additionalCardHolderFee" .=) <$>
1143+ _coAdditionalCardHolderFee,
1144+ ("existingCustomerOnly" .=) <$>
1145+ _coExistingCustomerOnly,
1146+ ("emergencyInsurance" .=) <$> _coEmergencyInsurance,
1147+ ("network" .=) <$> _coNetwork,
1148+ ("cashAdvanceTerms" .=) <$> _coCashAdvanceTerms,
1149+ ("statementCopyFee" .=) <$> _coStatementCopyFee,
1150+ ("aprDisplay" .=) <$> _coAprDisplay,
1151+ ("offersImmediateCashReward" .=) <$>
1152+ _coOffersImmediateCashReward,
1153+ ("rewards" .=) <$> _coRewards,
1154+ ("cardType" .=) <$> _coCardType,
1155+ ("imageUrl" .=) <$> _coImageUrl,
1156+ ("creditLimitMax" .=) <$> _coCreditLimitMax,
1157+ ("landingPageUrl" .=) <$> _coLandingPageUrl,
1158+ ("annualFee" .=) <$> _coAnnualFee,
1159+ ("rewardsExpire" .=) <$> _coRewardsExpire,
1160+ ("firstYearAnnualFee" .=) <$> _coFirstYearAnnualFee,
1161+ ("carRentalInsurance" .=) <$> _coCarRentalInsurance,
1162+ ("purchaseRateAdditionalDetails" .=) <$>
1163+ _coPurchaseRateAdditionalDetails,
1164+ ("offerId" .=) <$> _coOfferId,
1165+ ("gracePeriodDisplay" .=) <$> _coGracePeriodDisplay,
1166+ ("introPurchaseTerms" .=) <$> _coIntroPurchaseTerms,
1167+ ("creditRatingDisplay" .=) <$>
1168+ _coCreditRatingDisplay,
1169+ ("balanceTransferTerms" .=) <$>
1170+ _coBalanceTransferTerms,
1171+ ("latePaymentFee" .=) <$> _coLatePaymentFee,
1172+ ("cardBenefits" .=) <$> _coCardBenefits,
1173+ ("issuer" .=) <$> _coIssuer,
1174+ ("cardName" .=) <$> _coCardName,
1175+ ("minPurchaseRate" .=) <$> _coMinPurchaseRate,
1176+ ("fraudLiability" .=) <$> _coFraudLiability,
1177+ ("foreignCurrencyTransactionFee" .=) <$>
1178+ _coForeignCurrencyTransactionFee,
1179+ ("extendedWarranty" .=) <$> _coExtendedWarranty,
1180+ ("annualRewardMaximum" .=) <$>
1181+ _coAnnualRewardMaximum,
1182+ ("issuerId" .=) <$> _coIssuerId,
1183+ ("introBalanceTransferTerms" .=) <$>
1184+ _coIntroBalanceTransferTerms,
1185+ ("defaultFees" .=) <$> _coDefaultFees,
1186+ ("additionalCardBenefits" .=) <$>
1187+ _coAdditionalCardBenefits,
1188+ ("rewardUnit" .=) <$> _coRewardUnit,
1189+ ("bonusRewards" .=) <$> _coBonusRewards,
1190+ ("flightAccidentInsurance" .=) <$>
1191+ _coFlightAccidentInsurance,
1192+ ("rewardPartner" .=) <$> _coRewardPartner,
1193+ ("purchaseRateType" .=) <$> _coPurchaseRateType])
1194+
9681195--
9691196-- /See:/ 'ccOfferItemBonusRewards' smart constructor.
9701197data CcOfferItemBonusRewards = CcOfferItemBonusRewards
@@ -998,6 +1225,20 @@ coibrDetails :: Lens' CcOfferItemBonusRewards (Maybe Text)
9981225coibrDetails
9991226 = lens _coibrDetails (\ s a -> s{_coibrDetails = a})
10001227
1228+instance FromJSON CcOfferItemBonusRewards where
1229+ parseJSON
1230+ = withObject "CcOfferItemBonusRewards"
1231+ (\ o ->
1232+ CcOfferItemBonusRewards <$>
1233+ (o .:? "amount") <*> (o .:? "details"))
1234+
1235+instance ToJSON CcOfferItemBonusRewards where
1236+ toJSON CcOfferItemBonusRewards{..}
1237+ = object
1238+ (catMaybes
1239+ [("amount" .=) <$> _coibrAmount,
1240+ ("details" .=) <$> _coibrDetails])
1241+
10011242--
10021243-- /See:/ 'ccOfferItemDefaultFees' smart constructor.
10031244data CcOfferItemDefaultFees = CcOfferItemDefaultFees
@@ -1052,6 +1293,24 @@ coidfMaxRate :: Lens' CcOfferItemDefaultFees (Maybe Double)
10521293coidfMaxRate
10531294 = lens _coidfMaxRate (\ s a -> s{_coidfMaxRate = a})
10541295
1296+instance FromJSON CcOfferItemDefaultFees where
1297+ parseJSON
1298+ = withObject "CcOfferItemDefaultFees"
1299+ (\ o ->
1300+ CcOfferItemDefaultFees <$>
1301+ (o .:? "rateType") <*> (o .:? "minRate") <*>
1302+ (o .:? "category")
1303+ <*> (o .:? "maxRate"))
1304+
1305+instance ToJSON CcOfferItemDefaultFees where
1306+ toJSON CcOfferItemDefaultFees{..}
1307+ = object
1308+ (catMaybes
1309+ [("rateType" .=) <$> _coidfRateType,
1310+ ("minRate" .=) <$> _coidfMinRate,
1311+ ("category" .=) <$> _coidfCategory,
1312+ ("maxRate" .=) <$> _coidfMaxRate])
1313+
10551314--
10561315-- /See:/ 'ccOfferItemRewards' smart constructor.
10571316data CcOfferItemRewards = CcOfferItemRewards
@@ -1127,6 +1386,28 @@ coirMinRewardTier
11271386 = lens _coirMinRewardTier
11281387 (\ s a -> s{_coirMinRewardTier = a})
11291388
1389+instance FromJSON CcOfferItemRewards where
1390+ parseJSON
1391+ = withObject "CcOfferItemRewards"
1392+ (\ o ->
1393+ CcOfferItemRewards <$>
1394+ (o .:? "amount") <*> (o .:? "expirationMonths") <*>
1395+ (o .:? "category")
1396+ <*> (o .:? "additionalDetails")
1397+ <*> (o .:? "maxRewardTier")
1398+ <*> (o .:? "minRewardTier"))
1399+
1400+instance ToJSON CcOfferItemRewards where
1401+ toJSON CcOfferItemRewards{..}
1402+ = object
1403+ (catMaybes
1404+ [("amount" .=) <$> _coirAmount,
1405+ ("expirationMonths" .=) <$> _coirExpirationMonths,
1406+ ("category" .=) <$> _coirCategory,
1407+ ("additionalDetails" .=) <$> _coirAdditionalDetails,
1408+ ("maxRewardTier" .=) <$> _coirMaxRewardTier,
1409+ ("minRewardTier" .=) <$> _coirMinRewardTier])
1410+
11301411--
11311412-- /See:/ 'ccOffers' smart constructor.
11321413data CcOffers = CcOffers
@@ -1159,6 +1440,20 @@ cItems
11591440 = lens _cItems (\ s a -> s{_cItems = a}) . _Default .
11601441 _Coerce
11611442
1443+instance FromJSON CcOffers where
1444+ parseJSON
1445+ = withObject "CcOffers"
1446+ (\ o ->
1447+ CcOffers <$>
1448+ (o .:? "kind" .!= "gan#ccOffers") <*>
1449+ (o .:? "items" .!= mempty))
1450+
1451+instance ToJSON CcOffers where
1452+ toJSON CcOffers{..}
1453+ = object
1454+ (catMaybes
1455+ [Just ("kind" .= _cKind), ("items" .=) <$> _cItems])
1456+
11621457-- | An EventResource.
11631458--
11641459-- /See:/ 'event' smart constructor.
@@ -1351,6 +1646,53 @@ evePublisherName
13511646 = lens _evePublisherName
13521647 (\ s a -> s{_evePublisherName = a})
13531648
1649+instance FromJSON Event where
1650+ parseJSON
1651+ = withObject "Event"
1652+ (\ o ->
1653+ Event <$>
1654+ (o .:? "modifyDate") <*> (o .:? "status") <*>
1655+ (o .:? "commissionableSales")
1656+ <*> (o .:? "chargeId")
1657+ <*> (o .:? "advertiserName")
1658+ <*> (o .:? "chargeType")
1659+ <*> (o .:? "memberId")
1660+ <*> (o .:? "kind" .!= "gan#event")
1661+ <*> (o .:? "networkFee")
1662+ <*> (o .:? "advertiserId")
1663+ <*> (o .:? "eventDate")
1664+ <*> (o .:? "products" .!= mempty)
1665+ <*> (o .:? "publisherFee")
1666+ <*> (o .:? "type")
1667+ <*> (o .:? "orderId")
1668+ <*> (o .:? "publisherId")
1669+ <*> (o .:? "earnings")
1670+ <*> (o .:? "publisherName"))
1671+
1672+instance ToJSON Event where
1673+ toJSON Event{..}
1674+ = object
1675+ (catMaybes
1676+ [("modifyDate" .=) <$> _eveModifyDate,
1677+ ("status" .=) <$> _eveStatus,
1678+ ("commissionableSales" .=) <$>
1679+ _eveCommissionableSales,
1680+ ("chargeId" .=) <$> _eveChargeId,
1681+ ("advertiserName" .=) <$> _eveAdvertiserName,
1682+ ("chargeType" .=) <$> _eveChargeType,
1683+ ("memberId" .=) <$> _eveMemberId,
1684+ Just ("kind" .= _eveKind),
1685+ ("networkFee" .=) <$> _eveNetworkFee,
1686+ ("advertiserId" .=) <$> _eveAdvertiserId,
1687+ ("eventDate" .=) <$> _eveEventDate,
1688+ ("products" .=) <$> _eveProducts,
1689+ ("publisherFee" .=) <$> _evePublisherFee,
1690+ ("type" .=) <$> _eveType,
1691+ ("orderId" .=) <$> _eveOrderId,
1692+ ("publisherId" .=) <$> _evePublisherId,
1693+ ("earnings" .=) <$> _eveEarnings,
1694+ ("publisherName" .=) <$> _evePublisherName])
1695+
13541696--
13551697-- /See:/ 'eventItemProducts' smart constructor.
13561698data EventItemProducts = EventItemProducts
@@ -1450,6 +1792,34 @@ eipEarnings :: Lens' EventItemProducts (Maybe (Maybe Money))
14501792eipEarnings
14511793 = lens _eipEarnings (\ s a -> s{_eipEarnings = a})
14521794
1795+instance FromJSON EventItemProducts where
1796+ parseJSON
1797+ = withObject "EventItemProducts"
1798+ (\ o ->
1799+ EventItemProducts <$>
1800+ (o .:? "skuName") <*> (o .:? "networkFee") <*>
1801+ (o .:? "quantity")
1802+ <*> (o .:? "categoryName")
1803+ <*> (o .:? "categoryId")
1804+ <*> (o .:? "sku")
1805+ <*> (o .:? "publisherFee")
1806+ <*> (o .:? "unitPrice")
1807+ <*> (o .:? "earnings"))
1808+
1809+instance ToJSON EventItemProducts where
1810+ toJSON EventItemProducts{..}
1811+ = object
1812+ (catMaybes
1813+ [("skuName" .=) <$> _eipSkuName,
1814+ ("networkFee" .=) <$> _eipNetworkFee,
1815+ ("quantity" .=) <$> _eipQuantity,
1816+ ("categoryName" .=) <$> _eipCategoryName,
1817+ ("categoryId" .=) <$> _eipCategoryId,
1818+ ("sku" .=) <$> _eipSku,
1819+ ("publisherFee" .=) <$> _eipPublisherFee,
1820+ ("unitPrice" .=) <$> _eipUnitPrice,
1821+ ("earnings" .=) <$> _eipEarnings])
1822+
14531823--
14541824-- /See:/ 'events' smart constructor.
14551825data Events = Events
@@ -1493,6 +1863,22 @@ eItems
14931863 = lens _eItems (\ s a -> s{_eItems = a}) . _Default .
14941864 _Coerce
14951865
1866+instance FromJSON Events where
1867+ parseJSON
1868+ = withObject "Events"
1869+ (\ o ->
1870+ Events <$>
1871+ (o .:? "nextPageToken") <*>
1872+ (o .:? "kind" .!= "gan#events")
1873+ <*> (o .:? "items" .!= mempty))
1874+
1875+instance ToJSON Events where
1876+ toJSON Events{..}
1877+ = object
1878+ (catMaybes
1879+ [("nextPageToken" .=) <$> _eNextPageToken,
1880+ Just ("kind" .= _eKind), ("items" .=) <$> _eItems])
1881+
14961882-- | A LinkResource.
14971883--
14981884-- /See:/ 'link' smart constructor.
@@ -1711,6 +2097,60 @@ linDescription
17112097 = lens _linDescription
17122098 (\ s a -> s{_linDescription = a})
17132099
2100+instance FromJSON Link where
2101+ parseJSON
2102+ = withObject "Link"
2103+ (\ o ->
2104+ Link <$>
2105+ (o .:? "authorship") <*> (o .:? "destinationUrl") <*>
2106+ (o .:? "clickTrackingUrl")
2107+ <*> (o .:? "createDate")
2108+ <*> (o .:? "kind" .!= "gan#link")
2109+ <*> (o .:? "advertiserId")
2110+ <*> (o .:? "endDate")
2111+ <*> (o .:? "imageAltText")
2112+ <*> (o .:? "promotionType")
2113+ <*> (o .:? "availability")
2114+ <*> (o .:? "startDate")
2115+ <*> (o .:? "name")
2116+ <*> (o .:? "impressionTrackingUrl")
2117+ <*> (o .:? "specialOffers")
2118+ <*> (o .:? "epcSevenDayAverage")
2119+ <*> (o .:? "id")
2120+ <*> (o .:? "epcNinetyDayAverage")
2121+ <*> (o .:? "linkType")
2122+ <*> (o .:? "isActive")
2123+ <*> (o .:? "duration")
2124+ <*> (o .:? "description"))
2125+
2126+instance ToJSON Link where
2127+ toJSON Link{..}
2128+ = object
2129+ (catMaybes
2130+ [("authorship" .=) <$> _linAuthorship,
2131+ ("destinationUrl" .=) <$> _linDestinationUrl,
2132+ ("clickTrackingUrl" .=) <$> _linClickTrackingUrl,
2133+ ("createDate" .=) <$> _linCreateDate,
2134+ Just ("kind" .= _linKind),
2135+ ("advertiserId" .=) <$> _linAdvertiserId,
2136+ ("endDate" .=) <$> _linEndDate,
2137+ ("imageAltText" .=) <$> _linImageAltText,
2138+ ("promotionType" .=) <$> _linPromotionType,
2139+ ("availability" .=) <$> _linAvailability,
2140+ ("startDate" .=) <$> _linStartDate,
2141+ ("name" .=) <$> _linName,
2142+ ("impressionTrackingUrl" .=) <$>
2143+ _linImpressionTrackingUrl,
2144+ ("specialOffers" .=) <$> _linSpecialOffers,
2145+ ("epcSevenDayAverage" .=) <$> _linEpcSevenDayAverage,
2146+ ("id" .=) <$> _linId,
2147+ ("epcNinetyDayAverage" .=) <$>
2148+ _linEpcNinetyDayAverage,
2149+ ("linkType" .=) <$> _linLinkType,
2150+ ("isActive" .=) <$> _linIsActive,
2151+ ("duration" .=) <$> _linDuration,
2152+ ("description" .=) <$> _linDescription])
2153+
17142154-- | Special offers on the link.
17152155--
17162156-- /See:/ 'linkSpecialOffers' smart constructor.
@@ -1806,6 +2246,32 @@ lsoFreeGift :: Lens' LinkSpecialOffers (Maybe Bool)
18062246lsoFreeGift
18072247 = lens _lsoFreeGift (\ s a -> s{_lsoFreeGift = a})
18082248
2249+instance FromJSON LinkSpecialOffers where
2250+ parseJSON
2251+ = withObject "LinkSpecialOffers"
2252+ (\ o ->
2253+ LinkSpecialOffers <$>
2254+ (o .:? "freeShippingMin") <*> (o .:? "percentOff")
2255+ <*> (o .:? "priceCut")
2256+ <*> (o .:? "priceCutMin")
2257+ <*> (o .:? "percentOffMin")
2258+ <*> (o .:? "freeShipping")
2259+ <*> (o .:? "promotionCodes" .!= mempty)
2260+ <*> (o .:? "freeGift"))
2261+
2262+instance ToJSON LinkSpecialOffers where
2263+ toJSON LinkSpecialOffers{..}
2264+ = object
2265+ (catMaybes
2266+ [("freeShippingMin" .=) <$> _lsoFreeShippingMin,
2267+ ("percentOff" .=) <$> _lsoPercentOff,
2268+ ("priceCut" .=) <$> _lsoPriceCut,
2269+ ("priceCutMin" .=) <$> _lsoPriceCutMin,
2270+ ("percentOffMin" .=) <$> _lsoPercentOffMin,
2271+ ("freeShipping" .=) <$> _lsoFreeShipping,
2272+ ("promotionCodes" .=) <$> _lsoPromotionCodes,
2273+ ("freeGift" .=) <$> _lsoFreeGift])
2274+
18092275--
18102276-- /See:/ 'links' smart constructor.
18112277data Links = Links
@@ -1848,6 +2314,22 @@ lItems
18482314 = lens _lItems (\ s a -> s{_lItems = a}) . _Default .
18492315 _Coerce
18502316
2317+instance FromJSON Links where
2318+ parseJSON
2319+ = withObject "Links"
2320+ (\ o ->
2321+ Links <$>
2322+ (o .:? "nextPageToken") <*>
2323+ (o .:? "kind" .!= "gan#links")
2324+ <*> (o .:? "items" .!= mempty))
2325+
2326+instance ToJSON Links where
2327+ toJSON Links{..}
2328+ = object
2329+ (catMaybes
2330+ [("nextPageToken" .=) <$> _lNextPageToken,
2331+ Just ("kind" .= _lKind), ("items" .=) <$> _lItems])
2332+
18512333-- | An ApiMoneyProto.
18522334--
18532335-- /See:/ 'money' smart constructor.
@@ -1881,6 +2363,20 @@ mCurrencyCode
18812363 = lens _mCurrencyCode
18822364 (\ s a -> s{_mCurrencyCode = a})
18832365
2366+instance FromJSON Money where
2367+ parseJSON
2368+ = withObject "Money"
2369+ (\ o ->
2370+ Money <$>
2371+ (o .:? "amount") <*> (o .:? "currencyCode"))
2372+
2373+instance ToJSON Money where
2374+ toJSON Money{..}
2375+ = object
2376+ (catMaybes
2377+ [("amount" .=) <$> _mAmount,
2378+ ("currencyCode" .=) <$> _mCurrencyCode])
2379+
18842380-- | A PublisherResource.
18852381--
18862382-- /See:/ 'publisher' smart constructor.
@@ -2007,6 +2503,39 @@ pubSites
20072503 _Default
20082504 . _Coerce
20092505
2506+instance FromJSON Publisher where
2507+ parseJSON
2508+ = withObject "Publisher"
2509+ (\ o ->
2510+ Publisher <$>
2511+ (o .:? "status") <*>
2512+ (o .:? "kind" .!= "gan#publisher")
2513+ <*> (o .:? "payoutRank")
2514+ <*> (o .:? "joinDate")
2515+ <*> (o .:? "classification")
2516+ <*> (o .:? "name")
2517+ <*> (o .:? "epcSevenDayAverage")
2518+ <*> (o .:? "item")
2519+ <*> (o .:? "id")
2520+ <*> (o .:? "epcNinetyDayAverage")
2521+ <*> (o .:? "sites" .!= mempty))
2522+
2523+instance ToJSON Publisher where
2524+ toJSON Publisher{..}
2525+ = object
2526+ (catMaybes
2527+ [("status" .=) <$> _pubStatus,
2528+ Just ("kind" .= _pubKind),
2529+ ("payoutRank" .=) <$> _pubPayoutRank,
2530+ ("joinDate" .=) <$> _pubJoinDate,
2531+ ("classification" .=) <$> _pubClassification,
2532+ ("name" .=) <$> _pubName,
2533+ ("epcSevenDayAverage" .=) <$> _pubEpcSevenDayAverage,
2534+ ("item" .=) <$> _pubItem, ("id" .=) <$> _pubId,
2535+ ("epcNinetyDayAverage" .=) <$>
2536+ _pubEpcNinetyDayAverage,
2537+ ("sites" .=) <$> _pubSites])
2538+
20102539--
20112540-- /See:/ 'publishers' smart constructor.
20122541data Publishers = Publishers
@@ -2050,6 +2579,22 @@ pItems
20502579 = lens _pItems (\ s a -> s{_pItems = a}) . _Default .
20512580 _Coerce
20522581
2582+instance FromJSON Publishers where
2583+ parseJSON
2584+ = withObject "Publishers"
2585+ (\ o ->
2586+ Publishers <$>
2587+ (o .:? "nextPageToken") <*>
2588+ (o .:? "kind" .!= "gan#publishers")
2589+ <*> (o .:? "items" .!= mempty))
2590+
2591+instance ToJSON Publishers where
2592+ toJSON Publishers{..}
2593+ = object
2594+ (catMaybes
2595+ [("nextPageToken" .=) <$> _pNextPageToken,
2596+ Just ("kind" .= _pKind), ("items" .=) <$> _pItems])
2597+
20532598-- | A ReportResource representing a report of a certain type either for an
20542599-- advertiser or publisher.
20552600--
@@ -2140,3 +2685,30 @@ rColumnNames
21402685-- | The report type.
21412686rType :: Lens' Report (Maybe Text)
21422687rType = lens _rType (\ s a -> s{_rType = a})
2688+
2689+instance FromJSON Report where
2690+ parseJSON
2691+ = withObject "Report"
2692+ (\ o ->
2693+ Report <$>
2694+ (o .:? "end_date") <*>
2695+ (o .:? "totals_rows" .!= mempty)
2696+ <*> (o .:? "kind" .!= "gan#report")
2697+ <*> (o .:? "start_date")
2698+ <*> (o .:? "rows" .!= mempty)
2699+ <*> (o .:? "matching_row_count")
2700+ <*> (o .:? "column_names" .!= mempty)
2701+ <*> (o .:? "type"))
2702+
2703+instance ToJSON Report where
2704+ toJSON Report{..}
2705+ = object
2706+ (catMaybes
2707+ [("end_date" .=) <$> _rEndDate,
2708+ ("totals_rows" .=) <$> _rTotalsRows,
2709+ Just ("kind" .= _rKind),
2710+ ("start_date" .=) <$> _rStartDate,
2711+ ("rows" .=) <$> _rRows,
2712+ ("matching_row_count" .=) <$> _rMatchingRowCount,
2713+ ("column_names" .=) <$> _rColumnNames,
2714+ ("type" .=) <$> _rType])
gogol-analytics/gen/Network/Google/Analytics.hs+1327−1042
@@ -1117,68 +1117,80 @@ type McfAPI = McfGet
11171117
11181118-- | Returns Analytics Multi-Channel Funnels data for a view (profile).
11191119type McfGet =
1120− "analytics" :> "v3" :> "data" :> "mcf" :>
1121− QueryParam "quotaUser" Text
1122− :> QueryParam "metrics" Text
1123− :> QueryParam "prettyPrint" Bool
1124− :> QueryParam "samplingLevel" Text
1125− :> QueryParam "userIp" Text
1126− :> QueryParam "filters" Text
1127− :> QueryParam "ids" Text
1128− :> QueryParam "end-date" Text
1129− :> QueryParam "key" Text
1130− :> QueryParam "sort" Text
1131− :> QueryParam "dimensions" Text
1132− :> QueryParam "oauth_token" Text
1133− :> QueryParam "start-index" Natural
1134− :> QueryParam "max-results" Int32
1135− :> QueryParam "start-date" Text
1136− :> QueryParam "fields" Text
1137− :> QueryParam "alt" Text
1120+ "analytics" :>
1121+ "v3" :>
1122+ "data" :>
1123+ "mcf" :>
1124+ QueryParam "quotaUser" Text :>
1125+ QueryParam "metrics" Text :>
1126+ QueryParam "prettyPrint" Bool :>
1127+ QueryParam "samplingLevel" Text :>
1128+ QueryParam "userIp" Text :>
1129+ QueryParam "filters" Text :>
1130+ QueryParam "ids" Text :>
1131+ QueryParam "end-date" Text :>
1132+ QueryParam "key" Text :>
1133+ QueryParam "sort" Text :>
1134+ QueryParam "dimensions" Text :>
1135+ QueryParam "oauth_token" Text :>
1136+ QueryParam "start-index" Natural :>
1137+ QueryParam "max-results" Int32 :>
1138+ QueryParam "start-date" Text :>
1139+ QueryParam "fields" Text :>
1140+ QueryParam "alt" Text :>
1141+ Get '[JSON] McfData
11381142
11391143type GaAPI = GaGet
11401144
11411145-- | Returns Analytics data for a view (profile).
11421146type GaGet =
1143− "analytics" :> "v3" :> "data" :> "ga" :>
1144− QueryParam "quotaUser" Text
1145− :> QueryParam "metrics" Text
1146− :> QueryParam "prettyPrint" Bool
1147− :> QueryParam "samplingLevel" Text
1148− :> QueryParam "userIp" Text
1149− :> QueryParam "filters" Text
1150− :> QueryParam "ids" Text
1151− :> QueryParam "end-date" Text
1152− :> QueryParam "key" Text
1153− :> QueryParam "output" Text
1154− :> QueryParam "sort" Text
1155− :> QueryParam "dimensions" Text
1156− :> QueryParam "oauth_token" Text
1157− :> QueryParam "start-index" Natural
1158− :> QueryParam "max-results" Int32
1159− :> QueryParam "segment" Text
1160− :> QueryParam "start-date" Text
1161− :> QueryParam "fields" Text
1162− :> QueryParam "alt" Text
1147+ "analytics" :>
1148+ "v3" :>
1149+ "data" :>
1150+ "ga" :>
1151+ QueryParam "quotaUser" Text :>
1152+ QueryParam "metrics" Text :>
1153+ QueryParam "prettyPrint" Bool :>
1154+ QueryParam "samplingLevel" Text :>
1155+ QueryParam "userIp" Text :>
1156+ QueryParam "filters" Text :>
1157+ QueryParam "ids" Text :>
1158+ QueryParam "end-date" Text :>
1159+ QueryParam "key" Text :>
1160+ QueryParam "output" Text :>
1161+ QueryParam "sort" Text :>
1162+ QueryParam "dimensions" Text :>
1163+ QueryParam "oauth_token" Text :>
1164+ QueryParam "start-index" Natural :>
1165+ QueryParam "max-results" Int32 :>
1166+ QueryParam "segment" Text :>
1167+ QueryParam "start-date" Text :>
1168+ QueryParam "fields" Text :>
1169+ QueryParam "alt" Text :>
1170+ Get '[JSON] GaData
11631171
11641172type RealtimeAPI = RealtimeGet
11651173
11661174-- | Returns real time data for a view (profile).
11671175type RealtimeGet =
1168− "analytics" :> "v3" :> "data" :> "realtime" :>
1169− QueryParam "quotaUser" Text
1170− :> QueryParam "metrics" Text
1171− :> QueryParam "prettyPrint" Bool
1172− :> QueryParam "userIp" Text
1173− :> QueryParam "filters" Text
1174− :> QueryParam "ids" Text
1175− :> QueryParam "key" Text
1176− :> QueryParam "sort" Text
1177− :> QueryParam "dimensions" Text
1178− :> QueryParam "oauth_token" Text
1179− :> QueryParam "max-results" Int32
1180− :> QueryParam "fields" Text
1181− :> QueryParam "alt" Text
1176+ "analytics" :>
1177+ "v3" :>
1178+ "data" :>
1179+ "realtime" :>
1180+ QueryParam "quotaUser" Text :>
1181+ QueryParam "metrics" Text :>
1182+ QueryParam "prettyPrint" Bool :>
1183+ QueryParam "userIp" Text :>
1184+ QueryParam "filters" Text :>
1185+ QueryParam "ids" Text :>
1186+ QueryParam "key" Text :>
1187+ QueryParam "sort" Text :>
1188+ QueryParam "dimensions" Text :>
1189+ QueryParam "oauth_token" Text :>
1190+ QueryParam "max-results" Int32 :>
1191+ QueryParam "fields" Text :>
1192+ QueryParam "alt" Text :>
1193+ Get '[JSON] RealtimeData
11821194
11831195type ManagementAPI =
11841196 WebPropertyAdWordsLinksAPI :<|> UnsampledReportsAPI
@@ -1209,100 +1221,123 @@ type WebPropertyAdWordsLinksAPI =
12091221
12101222-- | Creates a webProperty-AdWords link.
12111223type WebPropertyAdWordsLinksInsert =
1212− "analytics" :> "v3" :> "management" :> "accounts" :>
1213− Capture "accountId" Text
1214− :> "webproperties"
1215− :> Capture "webPropertyId" Text
1216− :> "entityAdWordsLinks"
1217− :> QueryParam "quotaUser" Text
1218− :> QueryParam "prettyPrint" Bool
1219− :> QueryParam "userIp" Text
1220− :> QueryParam "key" Text
1221− :> QueryParam "oauth_token" Text
1222− :> QueryParam "fields" Text
1223− :> QueryParam "alt" Text
1224+ "analytics" :>
1225+ "v3" :>
1226+ "management" :>
1227+ "accounts" :>
1228+ Capture "accountId" Text :>
1229+ "webproperties" :>
1230+ Capture "webPropertyId" Text :>
1231+ "entityAdWordsLinks" :>
1232+ QueryParam "quotaUser" Text :>
1233+ QueryParam "prettyPrint" Bool :>
1234+ QueryParam "userIp" Text :>
1235+ QueryParam "key" Text :>
1236+ QueryParam "oauth_token" Text :>
1237+ QueryParam "fields" Text :>
1238+ QueryParam "alt" Text :>
1239+ Post '[JSON] EntityAdWordsLink
12241240
12251241-- | Lists webProperty-AdWords links for a given web property.
12261242type WebPropertyAdWordsLinksList =
1227− "analytics" :> "v3" :> "management" :> "accounts" :>
1228− Capture "accountId" Text
1229− :> "webproperties"
1230− :> Capture "webPropertyId" Text
1231− :> "entityAdWordsLinks"
1232− :> QueryParam "quotaUser" Text
1233− :> QueryParam "prettyPrint" Bool
1234− :> QueryParam "userIp" Text
1235− :> QueryParam "key" Text
1236− :> QueryParam "oauth_token" Text
1237− :> QueryParam "start-index" Natural
1238− :> QueryParam "max-results" Int32
1239− :> QueryParam "fields" Text
1240− :> QueryParam "alt" Text
1243+ "analytics" :>
1244+ "v3" :>
1245+ "management" :>
1246+ "accounts" :>
1247+ Capture "accountId" Text :>
1248+ "webproperties" :>
1249+ Capture "webPropertyId" Text :>
1250+ "entityAdWordsLinks" :>
1251+ QueryParam "quotaUser" Text :>
1252+ QueryParam "prettyPrint" Bool :>
1253+ QueryParam "userIp" Text :>
1254+ QueryParam "key" Text :>
1255+ QueryParam "oauth_token" Text :>
1256+ QueryParam "start-index" Natural :>
1257+ QueryParam "max-results" Int32 :>
1258+ QueryParam "fields" Text :>
1259+ QueryParam "alt" Text :>
1260+ Get '[JSON] EntityAdWordsLinks
12411261
12421262-- | Updates an existing webProperty-AdWords link. This method supports patch
12431263-- semantics.
12441264type WebPropertyAdWordsLinksPatch =
1245− "analytics" :> "v3" :> "management" :> "accounts" :>
1246− Capture "accountId" Text
1247− :> "webproperties"
1248− :> Capture "webPropertyId" Text
1249− :> "entityAdWordsLinks"
1250− :> Capture "webPropertyAdWordsLinkId" Text
1251− :> QueryParam "quotaUser" Text
1252− :> QueryParam "prettyPrint" Bool
1253− :> QueryParam "userIp" Text
1254− :> QueryParam "key" Text
1255− :> QueryParam "oauth_token" Text
1256− :> QueryParam "fields" Text
1257− :> QueryParam "alt" Text
1265+ "analytics" :>
1266+ "v3" :>
1267+ "management" :>
1268+ "accounts" :>
1269+ Capture "accountId" Text :>
1270+ "webproperties" :>
1271+ Capture "webPropertyId" Text :>
1272+ "entityAdWordsLinks" :>
1273+ Capture "webPropertyAdWordsLinkId" Text :>
1274+ QueryParam "quotaUser" Text :>
1275+ QueryParam "prettyPrint" Bool :>
1276+ QueryParam "userIp" Text :>
1277+ QueryParam "key" Text :>
1278+ QueryParam "oauth_token" Text :>
1279+ QueryParam "fields" Text :>
1280+ QueryParam "alt" Text :>
1281+ Patch '[JSON] EntityAdWordsLink
12581282
12591283-- | Returns a web property-AdWords link to which the user has access.
12601284type WebPropertyAdWordsLinksGet =
1261− "analytics" :> "v3" :> "management" :> "accounts" :>
1262− Capture "accountId" Text
1263− :> "webproperties"
1264− :> Capture "webPropertyId" Text
1265− :> "entityAdWordsLinks"
1266− :> Capture "webPropertyAdWordsLinkId" Text
1267− :> QueryParam "quotaUser" Text
1268− :> QueryParam "prettyPrint" Bool
1269− :> QueryParam "userIp" Text
1270− :> QueryParam "key" Text
1271− :> QueryParam "oauth_token" Text
1272− :> QueryParam "fields" Text
1273− :> QueryParam "alt" Text
1285+ "analytics" :>
1286+ "v3" :>
1287+ "management" :>
1288+ "accounts" :>
1289+ Capture "accountId" Text :>
1290+ "webproperties" :>
1291+ Capture "webPropertyId" Text :>
1292+ "entityAdWordsLinks" :>
1293+ Capture "webPropertyAdWordsLinkId" Text :>
1294+ QueryParam "quotaUser" Text :>
1295+ QueryParam "prettyPrint" Bool :>
1296+ QueryParam "userIp" Text :>
1297+ QueryParam "key" Text :>
1298+ QueryParam "oauth_token" Text :>
1299+ QueryParam "fields" Text :>
1300+ QueryParam "alt" Text :>
1301+ Get '[JSON] EntityAdWordsLink
12741302
12751303-- | Deletes a web property-AdWords link.
12761304type WebPropertyAdWordsLinksDelete =
1277− "analytics" :> "v3" :> "management" :> "accounts" :>
1278− Capture "accountId" Text
1279− :> "webproperties"
1280− :> Capture "webPropertyId" Text
1281− :> "entityAdWordsLinks"
1282− :> Capture "webPropertyAdWordsLinkId" Text
1283− :> QueryParam "quotaUser" Text
1284− :> QueryParam "prettyPrint" Bool
1285− :> QueryParam "userIp" Text
1286− :> QueryParam "key" Text
1287− :> QueryParam "oauth_token" Text
1288− :> QueryParam "fields" Text
1289− :> QueryParam "alt" Text
1305+ "analytics" :>
1306+ "v3" :>
1307+ "management" :>
1308+ "accounts" :>
1309+ Capture "accountId" Text :>
1310+ "webproperties" :>
1311+ Capture "webPropertyId" Text :>
1312+ "entityAdWordsLinks" :>
1313+ Capture "webPropertyAdWordsLinkId" Text :>
1314+ QueryParam "quotaUser" Text :>
1315+ QueryParam "prettyPrint" Bool :>
1316+ QueryParam "userIp" Text :>
1317+ QueryParam "key" Text :>
1318+ QueryParam "oauth_token" Text :>
1319+ QueryParam "fields" Text :>
1320+ QueryParam "alt" Text :> Delete '[JSON] ()
12901321
12911322-- | Updates an existing webProperty-AdWords link.
12921323type WebPropertyAdWordsLinksUpdate =
1293− "analytics" :> "v3" :> "management" :> "accounts" :>
1294− Capture "accountId" Text
1295− :> "webproperties"
1296− :> Capture "webPropertyId" Text
1297− :> "entityAdWordsLinks"
1298− :> Capture "webPropertyAdWordsLinkId" Text
1299− :> QueryParam "quotaUser" Text
1300− :> QueryParam "prettyPrint" Bool
1301− :> QueryParam "userIp" Text
1302− :> QueryParam "key" Text
1303− :> QueryParam "oauth_token" Text
1304− :> QueryParam "fields" Text
1305− :> QueryParam "alt" Text
1324+ "analytics" :>
1325+ "v3" :>
1326+ "management" :>
1327+ "accounts" :>
1328+ Capture "accountId" Text :>
1329+ "webproperties" :>
1330+ Capture "webPropertyId" Text :>
1331+ "entityAdWordsLinks" :>
1332+ Capture "webPropertyAdWordsLinkId" Text :>
1333+ QueryParam "quotaUser" Text :>
1334+ QueryParam "prettyPrint" Bool :>
1335+ QueryParam "userIp" Text :>
1336+ QueryParam "key" Text :>
1337+ QueryParam "oauth_token" Text :>
1338+ QueryParam "fields" Text :>
1339+ QueryParam "alt" Text :>
1340+ Put '[JSON] EntityAdWordsLink
13061341
13071342type UnsampledReportsAPI =
13081343 UnsampledReportsInsert :<|> UnsampledReportsList :<|>
@@ -1310,72 +1345,87 @@ type UnsampledReportsAPI =
13101345
13111346-- | Create a new unsampled report.
13121347type UnsampledReportsInsert =
1313− "analytics" :> "v3" :> "management" :> "accounts" :>
1314− Capture "accountId" Text
1315− :> "webproperties"
1316− :> Capture "webPropertyId" Text
1317− :> "profiles"
1318− :> Capture "profileId" Text
1319− :> "unsampledReports"
1320− :> QueryParam "quotaUser" Text
1321− :> QueryParam "prettyPrint" Bool
1322− :> QueryParam "userIp" Text
1323− :> QueryParam "key" Text
1324− :> QueryParam "oauth_token" Text
1325− :> QueryParam "fields" Text
1326− :> QueryParam "alt" Text
1348+ "analytics" :>
1349+ "v3" :>
1350+ "management" :>
1351+ "accounts" :>
1352+ Capture "accountId" Text :>
1353+ "webproperties" :>
1354+ Capture "webPropertyId" Text :>
1355+ "profiles" :>
1356+ Capture "profileId" Text :>
1357+ "unsampledReports" :>
1358+ QueryParam "quotaUser" Text :>
1359+ QueryParam "prettyPrint" Bool :>
1360+ QueryParam "userIp" Text :>
1361+ QueryParam "key" Text :>
1362+ QueryParam "oauth_token" Text :>
1363+ QueryParam "fields" Text :>
1364+ QueryParam "alt" Text :>
1365+ Post '[JSON] UnsampledReport
13271366
13281367-- | Lists unsampled reports to which the user has access.
13291368type UnsampledReportsList =
1330− "analytics" :> "v3" :> "management" :> "accounts" :>
1331− Capture "accountId" Text
1332− :> "webproperties"
1333− :> Capture "webPropertyId" Text
1334− :> "profiles"
1335− :> Capture "profileId" Text
1336− :> "unsampledReports"
1337− :> QueryParam "quotaUser" Text
1338− :> QueryParam "prettyPrint" Bool
1339− :> QueryParam "userIp" Text
1340− :> QueryParam "key" Text
1341− :> QueryParam "oauth_token" Text
1342− :> QueryParam "start-index" Natural
1343− :> QueryParam "max-results" Int32
1344− :> QueryParam "fields" Text
1345− :> QueryParam "alt" Text
1369+ "analytics" :>
1370+ "v3" :>
1371+ "management" :>
1372+ "accounts" :>
1373+ Capture "accountId" Text :>
1374+ "webproperties" :>
1375+ Capture "webPropertyId" Text :>
1376+ "profiles" :>
1377+ Capture "profileId" Text :>
1378+ "unsampledReports" :>
1379+ QueryParam "quotaUser" Text :>
1380+ QueryParam "prettyPrint" Bool :>
1381+ QueryParam "userIp" Text :>
1382+ QueryParam "key" Text :>
1383+ QueryParam "oauth_token" Text :>
1384+ QueryParam "start-index" Natural :>
1385+ QueryParam "max-results" Int32 :>
1386+ QueryParam "fields" Text :>
1387+ QueryParam "alt" Text :>
1388+ Get '[JSON] UnsampledReports
13461389
13471390-- | Returns a single unsampled report.
13481391type UnsampledReportsGet =
1349− "analytics" :> "v3" :> "management" :> "accounts" :>
1350− Capture "accountId" Text
1351− :> "webproperties"
1352− :> Capture "webPropertyId" Text
1353− :> "profiles"
1354− :> Capture "profileId" Text
1355− :> "unsampledReports"
1356− :> Capture "unsampledReportId" Text
1357− :> QueryParam "quotaUser" Text
1358− :> QueryParam "prettyPrint" Bool
1359− :> QueryParam "userIp" Text
1360− :> QueryParam "key" Text
1361− :> QueryParam "oauth_token" Text
1362− :> QueryParam "fields" Text
1363− :> QueryParam "alt" Text
1392+ "analytics" :>
1393+ "v3" :>
1394+ "management" :>
1395+ "accounts" :>
1396+ Capture "accountId" Text :>
1397+ "webproperties" :>
1398+ Capture "webPropertyId" Text :>
1399+ "profiles" :>
1400+ Capture "profileId" Text :>
1401+ "unsampledReports" :>
1402+ Capture "unsampledReportId" Text :>
1403+ QueryParam "quotaUser" Text :>
1404+ QueryParam "prettyPrint" Bool :>
1405+ QueryParam "userIp" Text :>
1406+ QueryParam "key" Text :>
1407+ QueryParam "oauth_token" Text :>
1408+ QueryParam "fields" Text :>
1409+ QueryParam "alt" Text :>
1410+ Get '[JSON] UnsampledReport
13641411
13651412type AccountsAPI = AccountsList
13661413
13671414-- | Lists all accounts to which the user has access.
13681415type AccountsList =
1369− "analytics" :> "v3" :> "management" :> "accounts" :>
1370− QueryParam "quotaUser" Text
1371− :> QueryParam "prettyPrint" Bool
1372− :> QueryParam "userIp" Text
1373− :> QueryParam "key" Text
1374− :> QueryParam "oauth_token" Text
1375− :> QueryParam "start-index" Natural
1376− :> QueryParam "max-results" Int32
1377− :> QueryParam "fields" Text
1378− :> QueryParam "alt" Text
1416+ "analytics" :>
1417+ "v3" :>
1418+ "management" :>
1419+ "accounts" :>
1420+ QueryParam "quotaUser" Text :>
1421+ QueryParam "prettyPrint" Bool :>
1422+ QueryParam "userIp" Text :>
1423+ QueryParam "key" Text :>
1424+ QueryParam "oauth_token" Text :>
1425+ QueryParam "start-index" Natural :>
1426+ QueryParam "max-results" Int32 :>
1427+ QueryParam "fields" Text :>
1428+ QueryParam "alt" Text :> Get '[JSON] Accounts
13791429
13801430type ExperimentsAPI =
13811431 ExperimentsInsert :<|> ExperimentsList :<|>
@@ -1386,130 +1436,158 @@ type ExperimentsAPI =
13861436
13871437-- | Create a new experiment.
13881438type ExperimentsInsert =
1389− "analytics" :> "v3" :> "management" :> "accounts" :>
1390− Capture "accountId" Text
1391− :> "webproperties"
1392− :> Capture "webPropertyId" Text
1393− :> "profiles"
1394− :> Capture "profileId" Text
1395− :> "experiments"
1396− :> QueryParam "quotaUser" Text
1397− :> QueryParam "prettyPrint" Bool
1398− :> QueryParam "userIp" Text
1399− :> QueryParam "key" Text
1400− :> QueryParam "oauth_token" Text
1401− :> QueryParam "fields" Text
1402− :> QueryParam "alt" Text
1439+ "analytics" :>
1440+ "v3" :>
1441+ "management" :>
1442+ "accounts" :>
1443+ Capture "accountId" Text :>
1444+ "webproperties" :>
1445+ Capture "webPropertyId" Text :>
1446+ "profiles" :>
1447+ Capture "profileId" Text :>
1448+ "experiments" :>
1449+ QueryParam "quotaUser" Text :>
1450+ QueryParam "prettyPrint" Bool :>
1451+ QueryParam "userIp" Text :>
1452+ QueryParam "key" Text :>
1453+ QueryParam "oauth_token" Text :>
1454+ QueryParam "fields" Text :>
1455+ QueryParam "alt" Text :>
1456+ Post '[JSON] Experiment
14031457
14041458-- | Lists experiments to which the user has access.
14051459type ExperimentsList =
1406− "analytics" :> "v3" :> "management" :> "accounts" :>
1407− Capture "accountId" Text
1408− :> "webproperties"
1409− :> Capture "webPropertyId" Text
1410− :> "profiles"
1411− :> Capture "profileId" Text
1412− :> "experiments"
1413− :> QueryParam "quotaUser" Text
1414− :> QueryParam "prettyPrint" Bool
1415− :> QueryParam "userIp" Text
1416− :> QueryParam "key" Text
1417− :> QueryParam "oauth_token" Text
1418− :> QueryParam "start-index" Natural
1419− :> QueryParam "max-results" Int32
1420− :> QueryParam "fields" Text
1421− :> QueryParam "alt" Text
1460+ "analytics" :>
1461+ "v3" :>
1462+ "management" :>
1463+ "accounts" :>
1464+ Capture "accountId" Text :>
1465+ "webproperties" :>
1466+ Capture "webPropertyId" Text :>
1467+ "profiles" :>
1468+ Capture "profileId" Text :>
1469+ "experiments" :>
1470+ QueryParam "quotaUser" Text :>
1471+ QueryParam "prettyPrint" Bool :>
1472+ QueryParam "userIp" Text :>
1473+ QueryParam "key" Text :>
1474+ QueryParam "oauth_token" Text :>
1475+ QueryParam "start-index" Natural :>
1476+ QueryParam "max-results" Int32 :>
1477+ QueryParam "fields" Text :>
1478+ QueryParam "alt" Text :>
1479+ Get '[JSON] Experiments
14221480
14231481-- | Update an existing experiment. This method supports patch semantics.
14241482type ExperimentsPatch =
1425− "analytics" :> "v3" :> "management" :> "accounts" :>
1426− Capture "accountId" Text
1427− :> "webproperties"
1428− :> Capture "webPropertyId" Text
1429− :> "profiles"
1430− :> Capture "profileId" Text
1431− :> "experiments"
1432− :> Capture "experimentId" Text
1433− :> QueryParam "quotaUser" Text
1434− :> QueryParam "prettyPrint" Bool
1435− :> QueryParam "userIp" Text
1436− :> QueryParam "key" Text
1437− :> QueryParam "oauth_token" Text
1438− :> QueryParam "fields" Text
1439− :> QueryParam "alt" Text
1483+ "analytics" :>
1484+ "v3" :>
1485+ "management" :>
1486+ "accounts" :>
1487+ Capture "accountId" Text :>
1488+ "webproperties" :>
1489+ Capture "webPropertyId" Text :>
1490+ "profiles" :>
1491+ Capture "profileId" Text :>
1492+ "experiments" :>
1493+ Capture "experimentId" Text :>
1494+ QueryParam "quotaUser" Text :>
1495+ QueryParam "prettyPrint" Bool :>
1496+ QueryParam "userIp" Text :>
1497+ QueryParam "key" Text :>
1498+ QueryParam "oauth_token" Text :>
1499+ QueryParam "fields" Text :>
1500+ QueryParam "alt" Text :>
1501+ Patch '[JSON] Experiment
14401502
14411503-- | Returns an experiment to which the user has access.
14421504type ExperimentsGet =
1443− "analytics" :> "v3" :> "management" :> "accounts" :>
1444− Capture "accountId" Text
1445− :> "webproperties"
1446− :> Capture "webPropertyId" Text
1447− :> "profiles"
1448− :> Capture "profileId" Text
1449− :> "experiments"
1450− :> Capture "experimentId" Text
1451− :> QueryParam "quotaUser" Text
1452− :> QueryParam "prettyPrint" Bool
1453− :> QueryParam "userIp" Text
1454− :> QueryParam "key" Text
1455− :> QueryParam "oauth_token" Text
1456− :> QueryParam "fields" Text
1457− :> QueryParam "alt" Text
1505+ "analytics" :>
1506+ "v3" :>
1507+ "management" :>
1508+ "accounts" :>
1509+ Capture "accountId" Text :>
1510+ "webproperties" :>
1511+ Capture "webPropertyId" Text :>
1512+ "profiles" :>
1513+ Capture "profileId" Text :>
1514+ "experiments" :>
1515+ Capture "experimentId" Text :>
1516+ QueryParam "quotaUser" Text :>
1517+ QueryParam "prettyPrint" Bool :>
1518+ QueryParam "userIp" Text :>
1519+ QueryParam "key" Text :>
1520+ QueryParam "oauth_token" Text :>
1521+ QueryParam "fields" Text :>
1522+ QueryParam "alt" Text :>
1523+ Get '[JSON] Experiment
14581524
14591525-- | Delete an experiment.
14601526type ExperimentsDelete =
1461− "analytics" :> "v3" :> "management" :> "accounts" :>
1462− Capture "accountId" Text
1463− :> "webproperties"
1464− :> Capture "webPropertyId" Text
1465− :> "profiles"
1466− :> Capture "profileId" Text
1467− :> "experiments"
1468− :> Capture "experimentId" Text
1469− :> QueryParam "quotaUser" Text
1470− :> QueryParam "prettyPrint" Bool
1471− :> QueryParam "userIp" Text
1472− :> QueryParam "key" Text
1473− :> QueryParam "oauth_token" Text
1474− :> QueryParam "fields" Text
1475− :> QueryParam "alt" Text
1527+ "analytics" :>
1528+ "v3" :>
1529+ "management" :>
1530+ "accounts" :>
1531+ Capture "accountId" Text :>
1532+ "webproperties" :>
1533+ Capture "webPropertyId" Text :>
1534+ "profiles" :>
1535+ Capture "profileId" Text :>
1536+ "experiments" :>
1537+ Capture "experimentId" Text :>
1538+ QueryParam "quotaUser" Text :>
1539+ QueryParam "prettyPrint" Bool :>
1540+ QueryParam "userIp" Text :>
1541+ QueryParam "key" Text :>
1542+ QueryParam "oauth_token" Text :>
1543+ QueryParam "fields" Text :>
1544+ QueryParam "alt" Text :>
1545+ Delete '[JSON] ()
14761546
14771547-- | Update an existing experiment.
14781548type ExperimentsUpdate =
1479− "analytics" :> "v3" :> "management" :> "accounts" :>
1480− Capture "accountId" Text
1481− :> "webproperties"
1482− :> Capture "webPropertyId" Text
1483− :> "profiles"
1484− :> Capture "profileId" Text
1485− :> "experiments"
1486− :> Capture "experimentId" Text
1487− :> QueryParam "quotaUser" Text
1488− :> QueryParam "prettyPrint" Bool
1489− :> QueryParam "userIp" Text
1490− :> QueryParam "key" Text
1491− :> QueryParam "oauth_token" Text
1492− :> QueryParam "fields" Text
1493− :> QueryParam "alt" Text
1549+ "analytics" :>
1550+ "v3" :>
1551+ "management" :>
1552+ "accounts" :>
1553+ Capture "accountId" Text :>
1554+ "webproperties" :>
1555+ Capture "webPropertyId" Text :>
1556+ "profiles" :>
1557+ Capture "profileId" Text :>
1558+ "experiments" :>
1559+ Capture "experimentId" Text :>
1560+ QueryParam "quotaUser" Text :>
1561+ QueryParam "prettyPrint" Bool :>
1562+ QueryParam "userIp" Text :>
1563+ QueryParam "key" Text :>
1564+ QueryParam "oauth_token" Text :>
1565+ QueryParam "fields" Text :>
1566+ QueryParam "alt" Text :>
1567+ Put '[JSON] Experiment
14941568
14951569type CustomDataSourcesAPI = CustomDataSourcesList
14961570
14971571-- | List custom data sources to which the user has access.
14981572type CustomDataSourcesList =
1499− "analytics" :> "v3" :> "management" :> "accounts" :>
1500− Capture "accountId" Text
1501− :> "webproperties"
1502− :> Capture "webPropertyId" Text
1503− :> "customDataSources"
1504− :> QueryParam "quotaUser" Text
1505− :> QueryParam "prettyPrint" Bool
1506− :> QueryParam "userIp" Text
1507− :> QueryParam "key" Text
1508− :> QueryParam "oauth_token" Text
1509− :> QueryParam "start-index" Natural
1510− :> QueryParam "max-results" Natural
1511− :> QueryParam "fields" Text
1512− :> QueryParam "alt" Text
1573+ "analytics" :>
1574+ "v3" :>
1575+ "management" :>
1576+ "accounts" :>
1577+ Capture "accountId" Text :>
1578+ "webproperties" :>
1579+ Capture "webPropertyId" Text :>
1580+ "customDataSources" :>
1581+ QueryParam "quotaUser" Text :>
1582+ QueryParam "prettyPrint" Bool :>
1583+ QueryParam "userIp" Text :>
1584+ QueryParam "key" Text :>
1585+ QueryParam "oauth_token" Text :>
1586+ QueryParam "start-index" Natural :>
1587+ QueryParam "max-results" Natural :>
1588+ QueryParam "fields" Text :>
1589+ QueryParam "alt" Text :>
1590+ Get '[JSON] CustomDataSources
15131591
15141592type WebpropertyUserLinksAPI =
15151593 WebpropertyUserLinksInsert :<|>
@@ -1519,67 +1597,82 @@ type WebpropertyUserLinksAPI =
15191597
15201598-- | Adds a new user to the given web property.
15211599type WebpropertyUserLinksInsert =
1522− "analytics" :> "v3" :> "management" :> "accounts" :>
1523− Capture "accountId" Text
1524− :> "webproperties"
1525− :> Capture "webPropertyId" Text
1526− :> "entityUserLinks"
1527− :> QueryParam "quotaUser" Text
1528− :> QueryParam "prettyPrint" Bool
1529− :> QueryParam "userIp" Text
1530− :> QueryParam "key" Text
1531− :> QueryParam "oauth_token" Text
1532− :> QueryParam "fields" Text
1533− :> QueryParam "alt" Text
1600+ "analytics" :>
1601+ "v3" :>
1602+ "management" :>
1603+ "accounts" :>
1604+ Capture "accountId" Text :>
1605+ "webproperties" :>
1606+ Capture "webPropertyId" Text :>
1607+ "entityUserLinks" :>
1608+ QueryParam "quotaUser" Text :>
1609+ QueryParam "prettyPrint" Bool :>
1610+ QueryParam "userIp" Text :>
1611+ QueryParam "key" Text :>
1612+ QueryParam "oauth_token" Text :>
1613+ QueryParam "fields" Text :>
1614+ QueryParam "alt" Text :>
1615+ Post '[JSON] EntityUserLink
15341616
15351617-- | Lists webProperty-user links for a given web property.
15361618type WebpropertyUserLinksList =
1537− "analytics" :> "v3" :> "management" :> "accounts" :>
1538− Capture "accountId" Text
1539− :> "webproperties"
1540− :> Capture "webPropertyId" Text
1541− :> "entityUserLinks"
1542− :> QueryParam "quotaUser" Text
1543− :> QueryParam "prettyPrint" Bool
1544− :> QueryParam "userIp" Text
1545− :> QueryParam "key" Text
1546− :> QueryParam "oauth_token" Text
1547− :> QueryParam "start-index" Natural
1548− :> QueryParam "max-results" Int32
1549− :> QueryParam "fields" Text
1550− :> QueryParam "alt" Text
1619+ "analytics" :>
1620+ "v3" :>
1621+ "management" :>
1622+ "accounts" :>
1623+ Capture "accountId" Text :>
1624+ "webproperties" :>
1625+ Capture "webPropertyId" Text :>
1626+ "entityUserLinks" :>
1627+ QueryParam "quotaUser" Text :>
1628+ QueryParam "prettyPrint" Bool :>
1629+ QueryParam "userIp" Text :>
1630+ QueryParam "key" Text :>
1631+ QueryParam "oauth_token" Text :>
1632+ QueryParam "start-index" Natural :>
1633+ QueryParam "max-results" Int32 :>
1634+ QueryParam "fields" Text :>
1635+ QueryParam "alt" Text :>
1636+ Get '[JSON] EntityUserLinks
15511637
15521638-- | Removes a user from the given web property.
15531639type WebpropertyUserLinksDelete =
1554− "analytics" :> "v3" :> "management" :> "accounts" :>
1555− Capture "accountId" Text
1556− :> "webproperties"
1557− :> Capture "webPropertyId" Text
1558− :> "entityUserLinks"
1559− :> Capture "linkId" Text
1560− :> QueryParam "quotaUser" Text
1561− :> QueryParam "prettyPrint" Bool
1562− :> QueryParam "userIp" Text
1563− :> QueryParam "key" Text
1564− :> QueryParam "oauth_token" Text
1565− :> QueryParam "fields" Text
1566− :> QueryParam "alt" Text
1640+ "analytics" :>
1641+ "v3" :>
1642+ "management" :>
1643+ "accounts" :>
1644+ Capture "accountId" Text :>
1645+ "webproperties" :>
1646+ Capture "webPropertyId" Text :>
1647+ "entityUserLinks" :>
1648+ Capture "linkId" Text :>
1649+ QueryParam "quotaUser" Text :>
1650+ QueryParam "prettyPrint" Bool :>
1651+ QueryParam "userIp" Text :>
1652+ QueryParam "key" Text :>
1653+ QueryParam "oauth_token" Text :>
1654+ QueryParam "fields" Text :>
1655+ QueryParam "alt" Text :> Delete '[JSON] ()
15671656
15681657-- | Updates permissions for an existing user on the given web property.
15691658type WebpropertyUserLinksUpdate =
1570− "analytics" :> "v3" :> "management" :> "accounts" :>
1571− Capture "accountId" Text
1572− :> "webproperties"
1573− :> Capture "webPropertyId" Text
1574− :> "entityUserLinks"
1575− :> Capture "linkId" Text
1576− :> QueryParam "quotaUser" Text
1577− :> QueryParam "prettyPrint" Bool
1578− :> QueryParam "userIp" Text
1579− :> QueryParam "key" Text
1580− :> QueryParam "oauth_token" Text
1581− :> QueryParam "fields" Text
1582− :> QueryParam "alt" Text
1659+ "analytics" :>
1660+ "v3" :>
1661+ "management" :>
1662+ "accounts" :>
1663+ Capture "accountId" Text :>
1664+ "webproperties" :>
1665+ Capture "webPropertyId" Text :>
1666+ "entityUserLinks" :>
1667+ Capture "linkId" Text :>
1668+ QueryParam "quotaUser" Text :>
1669+ QueryParam "prettyPrint" Bool :>
1670+ QueryParam "userIp" Text :>
1671+ QueryParam "key" Text :>
1672+ QueryParam "oauth_token" Text :>
1673+ QueryParam "fields" Text :>
1674+ QueryParam "alt" Text :>
1675+ Put '[JSON] EntityUserLink
15831676
15841677type ProfilesAPI =
15851678 ProfilesInsert :<|> ProfilesList :<|> ProfilesPatch
@@ -1589,100 +1682,120 @@ type ProfilesAPI =
15891682
15901683-- | Create a new view (profile).
15911684type ProfilesInsert =
1592− "analytics" :> "v3" :> "management" :> "accounts" :>
1593− Capture "accountId" Text
1594− :> "webproperties"
1595− :> Capture "webPropertyId" Text
1596− :> "profiles"
1597− :> QueryParam "quotaUser" Text
1598− :> QueryParam "prettyPrint" Bool
1599− :> QueryParam "userIp" Text
1600− :> QueryParam "key" Text
1601− :> QueryParam "oauth_token" Text
1602− :> QueryParam "fields" Text
1603− :> QueryParam "alt" Text
1685+ "analytics" :>
1686+ "v3" :>
1687+ "management" :>
1688+ "accounts" :>
1689+ Capture "accountId" Text :>
1690+ "webproperties" :>
1691+ Capture "webPropertyId" Text :>
1692+ "profiles" :>
1693+ QueryParam "quotaUser" Text :>
1694+ QueryParam "prettyPrint" Bool :>
1695+ QueryParam "userIp" Text :>
1696+ QueryParam "key" Text :>
1697+ QueryParam "oauth_token" Text :>
1698+ QueryParam "fields" Text :>
1699+ QueryParam "alt" Text :> Post '[JSON] Profile
16041700
16051701-- | Lists views (profiles) to which the user has access.
16061702type ProfilesList =
1607− "analytics" :> "v3" :> "management" :> "accounts" :>
1608− Capture "accountId" Text
1609− :> "webproperties"
1610− :> Capture "webPropertyId" Text
1611− :> "profiles"
1612− :> QueryParam "quotaUser" Text
1613− :> QueryParam "prettyPrint" Bool
1614− :> QueryParam "userIp" Text
1615− :> QueryParam "key" Text
1616− :> QueryParam "oauth_token" Text
1617− :> QueryParam "start-index" Natural
1618− :> QueryParam "max-results" Int32
1619− :> QueryParam "fields" Text
1620− :> QueryParam "alt" Text
1703+ "analytics" :>
1704+ "v3" :>
1705+ "management" :>
1706+ "accounts" :>
1707+ Capture "accountId" Text :>
1708+ "webproperties" :>
1709+ Capture "webPropertyId" Text :>
1710+ "profiles" :>
1711+ QueryParam "quotaUser" Text :>
1712+ QueryParam "prettyPrint" Bool :>
1713+ QueryParam "userIp" Text :>
1714+ QueryParam "key" Text :>
1715+ QueryParam "oauth_token" Text :>
1716+ QueryParam "start-index" Natural :>
1717+ QueryParam "max-results" Int32 :>
1718+ QueryParam "fields" Text :>
1719+ QueryParam "alt" Text :>
1720+ Get '[JSON] Profiles
16211721
16221722-- | Updates an existing view (profile). This method supports patch
16231723-- semantics.
16241724type ProfilesPatch =
1625− "analytics" :> "v3" :> "management" :> "accounts" :>
1626− Capture "accountId" Text
1627− :> "webproperties"
1628− :> Capture "webPropertyId" Text
1629− :> "profiles"
1630− :> Capture "profileId" Text
1631− :> QueryParam "quotaUser" Text
1632− :> QueryParam "prettyPrint" Bool
1633− :> QueryParam "userIp" Text
1634− :> QueryParam "key" Text
1635− :> QueryParam "oauth_token" Text
1636− :> QueryParam "fields" Text
1637− :> QueryParam "alt" Text
1725+ "analytics" :>
1726+ "v3" :>
1727+ "management" :>
1728+ "accounts" :>
1729+ Capture "accountId" Text :>
1730+ "webproperties" :>
1731+ Capture "webPropertyId" Text :>
1732+ "profiles" :>
1733+ Capture "profileId" Text :>
1734+ QueryParam "quotaUser" Text :>
1735+ QueryParam "prettyPrint" Bool :>
1736+ QueryParam "userIp" Text :>
1737+ QueryParam "key" Text :>
1738+ QueryParam "oauth_token" Text :>
1739+ QueryParam "fields" Text :>
1740+ QueryParam "alt" Text :>
1741+ Patch '[JSON] Profile
16381742
16391743-- | Gets a view (profile) to which the user has access.
16401744type ProfilesGet =
1641− "analytics" :> "v3" :> "management" :> "accounts" :>
1642− Capture "accountId" Text
1643− :> "webproperties"
1644− :> Capture "webPropertyId" Text
1645− :> "profiles"
1646− :> Capture "profileId" Text
1647− :> QueryParam "quotaUser" Text
1648− :> QueryParam "prettyPrint" Bool
1649− :> QueryParam "userIp" Text
1650− :> QueryParam "key" Text
1651− :> QueryParam "oauth_token" Text
1652− :> QueryParam "fields" Text
1653− :> QueryParam "alt" Text
1745+ "analytics" :>
1746+ "v3" :>
1747+ "management" :>
1748+ "accounts" :>
1749+ Capture "accountId" Text :>
1750+ "webproperties" :>
1751+ Capture "webPropertyId" Text :>
1752+ "profiles" :>
1753+ Capture "profileId" Text :>
1754+ QueryParam "quotaUser" Text :>
1755+ QueryParam "prettyPrint" Bool :>
1756+ QueryParam "userIp" Text :>
1757+ QueryParam "key" Text :>
1758+ QueryParam "oauth_token" Text :>
1759+ QueryParam "fields" Text :>
1760+ QueryParam "alt" Text :> Get '[JSON] Profile
16541761
16551762-- | Deletes a view (profile).
16561763type ProfilesDelete =
1657− "analytics" :> "v3" :> "management" :> "accounts" :>
1658− Capture "accountId" Text
1659− :> "webproperties"
1660− :> Capture "webPropertyId" Text
1661− :> "profiles"
1662− :> Capture "profileId" Text
1663− :> QueryParam "quotaUser" Text
1664− :> QueryParam "prettyPrint" Bool
1665− :> QueryParam "userIp" Text
1666− :> QueryParam "key" Text
1667− :> QueryParam "oauth_token" Text
1668− :> QueryParam "fields" Text
1669− :> QueryParam "alt" Text
1764+ "analytics" :>
1765+ "v3" :>
1766+ "management" :>
1767+ "accounts" :>
1768+ Capture "accountId" Text :>
1769+ "webproperties" :>
1770+ Capture "webPropertyId" Text :>
1771+ "profiles" :>
1772+ Capture "profileId" Text :>
1773+ QueryParam "quotaUser" Text :>
1774+ QueryParam "prettyPrint" Bool :>
1775+ QueryParam "userIp" Text :>
1776+ QueryParam "key" Text :>
1777+ QueryParam "oauth_token" Text :>
1778+ QueryParam "fields" Text :>
1779+ QueryParam "alt" Text :> Delete '[JSON] ()
16701780
16711781-- | Updates an existing view (profile).
16721782type ProfilesUpdate =
1673− "analytics" :> "v3" :> "management" :> "accounts" :>
1674− Capture "accountId" Text
1675− :> "webproperties"
1676− :> Capture "webPropertyId" Text
1677− :> "profiles"
1678− :> Capture "profileId" Text
1679− :> QueryParam "quotaUser" Text
1680− :> QueryParam "prettyPrint" Bool
1681− :> QueryParam "userIp" Text
1682− :> QueryParam "key" Text
1683− :> QueryParam "oauth_token" Text
1684− :> QueryParam "fields" Text
1685− :> QueryParam "alt" Text
1783+ "analytics" :>
1784+ "v3" :>
1785+ "management" :>
1786+ "accounts" :>
1787+ Capture "accountId" Text :>
1788+ "webproperties" :>
1789+ Capture "webPropertyId" Text :>
1790+ "profiles" :>
1791+ Capture "profileId" Text :>
1792+ QueryParam "quotaUser" Text :>
1793+ QueryParam "prettyPrint" Bool :>
1794+ QueryParam "userIp" Text :>
1795+ QueryParam "key" Text :>
1796+ QueryParam "oauth_token" Text :>
1797+ QueryParam "fields" Text :>
1798+ QueryParam "alt" Text :> Put '[JSON] Profile
16861799
16871800type FiltersAPI =
16881801 FiltersInsert :<|> FiltersList :<|> FiltersPatch :<|>
@@ -1692,104 +1805,125 @@ type FiltersAPI =
16921805
16931806-- | Create a new filter.
16941807type FiltersInsert =
1695− "analytics" :> "v3" :> "management" :> "accounts" :>
1696− Capture "accountId" Text
1697− :> "filters"
1698− :> QueryParam "quotaUser" Text
1699− :> QueryParam "prettyPrint" Bool
1700− :> QueryParam "userIp" Text
1701− :> QueryParam "key" Text
1702− :> QueryParam "oauth_token" Text
1703− :> QueryParam "fields" Text
1704− :> QueryParam "alt" Text
1808+ "analytics" :>
1809+ "v3" :>
1810+ "management" :>
1811+ "accounts" :>
1812+ Capture "accountId" Text :>
1813+ "filters" :>
1814+ QueryParam "quotaUser" Text :>
1815+ QueryParam "prettyPrint" Bool :>
1816+ QueryParam "userIp" Text :>
1817+ QueryParam "key" Text :>
1818+ QueryParam "oauth_token" Text :>
1819+ QueryParam "fields" Text :>
1820+ QueryParam "alt" Text :> Post '[JSON] Filter
17051821
17061822-- | Lists all filters for an account
17071823type FiltersList =
1708− "analytics" :> "v3" :> "management" :> "accounts" :>
1709− Capture "accountId" Text
1710− :> "filters"
1711− :> QueryParam "quotaUser" Text
1712− :> QueryParam "prettyPrint" Bool
1713− :> QueryParam "userIp" Text
1714− :> QueryParam "key" Text
1715− :> QueryParam "oauth_token" Text
1716− :> QueryParam "start-index" Natural
1717− :> QueryParam "max-results" Int32
1718− :> QueryParam "fields" Text
1719− :> QueryParam "alt" Text
1824+ "analytics" :>
1825+ "v3" :>
1826+ "management" :>
1827+ "accounts" :>
1828+ Capture "accountId" Text :>
1829+ "filters" :>
1830+ QueryParam "quotaUser" Text :>
1831+ QueryParam "prettyPrint" Bool :>
1832+ QueryParam "userIp" Text :>
1833+ QueryParam "key" Text :>
1834+ QueryParam "oauth_token" Text :>
1835+ QueryParam "start-index" Natural :>
1836+ QueryParam "max-results" Int32 :>
1837+ QueryParam "fields" Text :>
1838+ QueryParam "alt" Text :> Get '[JSON] Filters
17201839
17211840-- | Updates an existing filter. This method supports patch semantics.
17221841type FiltersPatch =
1723− "analytics" :> "v3" :> "management" :> "accounts" :>
1724− Capture "accountId" Text
1725− :> "filters"
1726− :> Capture "filterId" Text
1727− :> QueryParam "quotaUser" Text
1728− :> QueryParam "prettyPrint" Bool
1729− :> QueryParam "userIp" Text
1730− :> QueryParam "key" Text
1731− :> QueryParam "oauth_token" Text
1732− :> QueryParam "fields" Text
1733− :> QueryParam "alt" Text
1842+ "analytics" :>
1843+ "v3" :>
1844+ "management" :>
1845+ "accounts" :>
1846+ Capture "accountId" Text :>
1847+ "filters" :>
1848+ Capture "filterId" Text :>
1849+ QueryParam "quotaUser" Text :>
1850+ QueryParam "prettyPrint" Bool :>
1851+ QueryParam "userIp" Text :>
1852+ QueryParam "key" Text :>
1853+ QueryParam "oauth_token" Text :>
1854+ QueryParam "fields" Text :>
1855+ QueryParam "alt" Text :> Patch '[JSON] Filter
17341856
17351857-- | Returns a filters to which the user has access.
17361858type FiltersGet =
1737− "analytics" :> "v3" :> "management" :> "accounts" :>
1738− Capture "accountId" Text
1739− :> "filters"
1740− :> Capture "filterId" Text
1741− :> QueryParam "quotaUser" Text
1742− :> QueryParam "prettyPrint" Bool
1743− :> QueryParam "userIp" Text
1744− :> QueryParam "key" Text
1745− :> QueryParam "oauth_token" Text
1746− :> QueryParam "fields" Text
1747− :> QueryParam "alt" Text
1859+ "analytics" :>
1860+ "v3" :>
1861+ "management" :>
1862+ "accounts" :>
1863+ Capture "accountId" Text :>
1864+ "filters" :>
1865+ Capture "filterId" Text :>
1866+ QueryParam "quotaUser" Text :>
1867+ QueryParam "prettyPrint" Bool :>
1868+ QueryParam "userIp" Text :>
1869+ QueryParam "key" Text :>
1870+ QueryParam "oauth_token" Text :>
1871+ QueryParam "fields" Text :>
1872+ QueryParam "alt" Text :> Get '[JSON] Filter
17481873
17491874-- | Delete a filter.
17501875type FiltersDelete =
1751− "analytics" :> "v3" :> "management" :> "accounts" :>
1752− Capture "accountId" Text
1753− :> "filters"
1754− :> Capture "filterId" Text
1755− :> QueryParam "quotaUser" Text
1756− :> QueryParam "prettyPrint" Bool
1757− :> QueryParam "userIp" Text
1758− :> QueryParam "key" Text
1759− :> QueryParam "oauth_token" Text
1760− :> QueryParam "fields" Text
1761− :> QueryParam "alt" Text
1876+ "analytics" :>
1877+ "v3" :>
1878+ "management" :>
1879+ "accounts" :>
1880+ Capture "accountId" Text :>
1881+ "filters" :>
1882+ Capture "filterId" Text :>
1883+ QueryParam "quotaUser" Text :>
1884+ QueryParam "prettyPrint" Bool :>
1885+ QueryParam "userIp" Text :>
1886+ QueryParam "key" Text :>
1887+ QueryParam "oauth_token" Text :>
1888+ QueryParam "fields" Text :>
1889+ QueryParam "alt" Text :> Delete '[JSON] Filter
17621890
17631891-- | Updates an existing filter.
17641892type FiltersUpdate =
1765− "analytics" :> "v3" :> "management" :> "accounts" :>
1766− Capture "accountId" Text
1767− :> "filters"
1768− :> Capture "filterId" Text
1769− :> QueryParam "quotaUser" Text
1770− :> QueryParam "prettyPrint" Bool
1771− :> QueryParam "userIp" Text
1772− :> QueryParam "key" Text
1773− :> QueryParam "oauth_token" Text
1774− :> QueryParam "fields" Text
1775− :> QueryParam "alt" Text
1893+ "analytics" :>
1894+ "v3" :>
1895+ "management" :>
1896+ "accounts" :>
1897+ Capture "accountId" Text :>
1898+ "filters" :>
1899+ Capture "filterId" Text :>
1900+ QueryParam "quotaUser" Text :>
1901+ QueryParam "prettyPrint" Bool :>
1902+ QueryParam "userIp" Text :>
1903+ QueryParam "key" Text :>
1904+ QueryParam "oauth_token" Text :>
1905+ QueryParam "fields" Text :>
1906+ QueryParam "alt" Text :> Put '[JSON] Filter
17761907
17771908type AccountSummariesAPI = AccountSummariesList
17781909
17791910-- | Lists account summaries (lightweight tree comprised of
17801911-- accounts\/properties\/profiles) to which the user has access.
17811912type AccountSummariesList =
1782− "analytics" :> "v3" :> "management" :>
1783− "accountSummaries"
1784− :> QueryParam "quotaUser" Text
1785− :> QueryParam "prettyPrint" Bool
1786− :> QueryParam "userIp" Text
1787− :> QueryParam "key" Text
1788− :> QueryParam "oauth_token" Text
1789− :> QueryParam "start-index" Natural
1790− :> QueryParam "max-results" Int32
1791− :> QueryParam "fields" Text
1792− :> QueryParam "alt" Text
1913+ "analytics" :>
1914+ "v3" :>
1915+ "management" :>
1916+ "accountSummaries" :>
1917+ QueryParam "quotaUser" Text :>
1918+ QueryParam "prettyPrint" Bool :>
1919+ QueryParam "userIp" Text :>
1920+ QueryParam "key" Text :>
1921+ QueryParam "oauth_token" Text :>
1922+ QueryParam "start-index" Natural :>
1923+ QueryParam "max-results" Int32 :>
1924+ QueryParam "fields" Text :>
1925+ QueryParam "alt" Text :>
1926+ Get '[JSON] AccountSummaries
17931927
17941928type GoalsAPI =
17951929 GoalsInsert :<|> GoalsList :<|> GoalsPatch :<|>
@@ -1798,94 +1932,111 @@ type GoalsAPI =
17981932
17991933-- | Create a new goal.
18001934type GoalsInsert =
1801− "analytics" :> "v3" :> "management" :> "accounts" :>
1802− Capture "accountId" Text
1803− :> "webproperties"
1804− :> Capture "webPropertyId" Text
1805− :> "profiles"
1806− :> Capture "profileId" Text
1807− :> "goals"
1808− :> QueryParam "quotaUser" Text
1809− :> QueryParam "prettyPrint" Bool
1810− :> QueryParam "userIp" Text
1811− :> QueryParam "key" Text
1812− :> QueryParam "oauth_token" Text
1813− :> QueryParam "fields" Text
1814− :> QueryParam "alt" Text
1935+ "analytics" :>
1936+ "v3" :>
1937+ "management" :>
1938+ "accounts" :>
1939+ Capture "accountId" Text :>
1940+ "webproperties" :>
1941+ Capture "webPropertyId" Text :>
1942+ "profiles" :>
1943+ Capture "profileId" Text :>
1944+ "goals" :>
1945+ QueryParam "quotaUser" Text :>
1946+ QueryParam "prettyPrint" Bool :>
1947+ QueryParam "userIp" Text :>
1948+ QueryParam "key" Text :>
1949+ QueryParam "oauth_token" Text :>
1950+ QueryParam "fields" Text :>
1951+ QueryParam "alt" Text :> Post '[JSON] Goal
18151952
18161953-- | Lists goals to which the user has access.
18171954type GoalsList =
1818− "analytics" :> "v3" :> "management" :> "accounts" :>
1819− Capture "accountId" Text
1820− :> "webproperties"
1821− :> Capture "webPropertyId" Text
1822− :> "profiles"
1823− :> Capture "profileId" Text
1824− :> "goals"
1825− :> QueryParam "quotaUser" Text
1826− :> QueryParam "prettyPrint" Bool
1827− :> QueryParam "userIp" Text
1828− :> QueryParam "key" Text
1829− :> QueryParam "oauth_token" Text
1830− :> QueryParam "start-index" Natural
1831− :> QueryParam "max-results" Int32
1832− :> QueryParam "fields" Text
1833− :> QueryParam "alt" Text
1955+ "analytics" :>
1956+ "v3" :>
1957+ "management" :>
1958+ "accounts" :>
1959+ Capture "accountId" Text :>
1960+ "webproperties" :>
1961+ Capture "webPropertyId" Text :>
1962+ "profiles" :>
1963+ Capture "profileId" Text :>
1964+ "goals" :>
1965+ QueryParam "quotaUser" Text :>
1966+ QueryParam "prettyPrint" Bool :>
1967+ QueryParam "userIp" Text :>
1968+ QueryParam "key" Text :>
1969+ QueryParam "oauth_token" Text :>
1970+ QueryParam "start-index" Natural :>
1971+ QueryParam "max-results" Int32 :>
1972+ QueryParam "fields" Text :>
1973+ QueryParam "alt" Text :>
1974+ Get '[JSON] Goals
18341975
18351976-- | Updates an existing view (profile). This method supports patch
18361977-- semantics.
18371978type GoalsPatch =
1838− "analytics" :> "v3" :> "management" :> "accounts" :>
1839− Capture "accountId" Text
1840− :> "webproperties"
1841− :> Capture "webPropertyId" Text
1842− :> "profiles"
1843− :> Capture "profileId" Text
1844− :> "goals"
1845− :> Capture "goalId" Text
1846− :> QueryParam "quotaUser" Text
1847− :> QueryParam "prettyPrint" Bool
1848− :> QueryParam "userIp" Text
1849− :> QueryParam "key" Text
1850− :> QueryParam "oauth_token" Text
1851− :> QueryParam "fields" Text
1852− :> QueryParam "alt" Text
1979+ "analytics" :>
1980+ "v3" :>
1981+ "management" :>
1982+ "accounts" :>
1983+ Capture "accountId" Text :>
1984+ "webproperties" :>
1985+ Capture "webPropertyId" Text :>
1986+ "profiles" :>
1987+ Capture "profileId" Text :>
1988+ "goals" :>
1989+ Capture "goalId" Text :>
1990+ QueryParam "quotaUser" Text :>
1991+ QueryParam "prettyPrint" Bool :>
1992+ QueryParam "userIp" Text :>
1993+ QueryParam "key" Text :>
1994+ QueryParam "oauth_token" Text :>
1995+ QueryParam "fields" Text :>
1996+ QueryParam "alt" Text :>
1997+ Patch '[JSON] Goal
18531998
18541999-- | Gets a goal to which the user has access.
18552000type GoalsGet =
1856− "analytics" :> "v3" :> "management" :> "accounts" :>
1857− Capture "accountId" Text
1858− :> "webproperties"
1859− :> Capture "webPropertyId" Text
1860− :> "profiles"
1861− :> Capture "profileId" Text
1862− :> "goals"
1863− :> Capture "goalId" Text
1864− :> QueryParam "quotaUser" Text
1865− :> QueryParam "prettyPrint" Bool
1866− :> QueryParam "userIp" Text
1867− :> QueryParam "key" Text
1868− :> QueryParam "oauth_token" Text
1869− :> QueryParam "fields" Text
1870− :> QueryParam "alt" Text
2001+ "analytics" :>
2002+ "v3" :>
2003+ "management" :>
2004+ "accounts" :>
2005+ Capture "accountId" Text :>
2006+ "webproperties" :>
2007+ Capture "webPropertyId" Text :>
2008+ "profiles" :>
2009+ Capture "profileId" Text :>
2010+ "goals" :>
2011+ Capture "goalId" Text :>
2012+ QueryParam "quotaUser" Text :>
2013+ QueryParam "prettyPrint" Bool :>
2014+ QueryParam "userIp" Text :>
2015+ QueryParam "key" Text :>
2016+ QueryParam "oauth_token" Text :>
2017+ QueryParam "fields" Text :>
2018+ QueryParam "alt" Text :> Get '[JSON] Goal
18712019
18722020-- | Updates an existing view (profile).
18732021type GoalsUpdate =
1874− "analytics" :> "v3" :> "management" :> "accounts" :>
1875− Capture "accountId" Text
1876− :> "webproperties"
1877− :> Capture "webPropertyId" Text
1878− :> "profiles"
1879− :> Capture "profileId" Text
1880− :> "goals"
1881− :> Capture "goalId" Text
1882− :> QueryParam "quotaUser" Text
1883− :> QueryParam "prettyPrint" Bool
1884− :> QueryParam "userIp" Text
1885− :> QueryParam "key" Text
1886− :> QueryParam "oauth_token" Text
1887− :> QueryParam "fields" Text
1888− :> QueryParam "alt" Text
2022+ "analytics" :>
2023+ "v3" :>
2024+ "management" :>
2025+ "accounts" :>
2026+ Capture "accountId" Text :>
2027+ "webproperties" :>
2028+ Capture "webPropertyId" Text :>
2029+ "profiles" :>
2030+ Capture "profileId" Text :>
2031+ "goals" :>
2032+ Capture "goalId" Text :>
2033+ QueryParam "quotaUser" Text :>
2034+ QueryParam "prettyPrint" Bool :>
2035+ QueryParam "userIp" Text :>
2036+ QueryParam "key" Text :>
2037+ QueryParam "oauth_token" Text :>
2038+ QueryParam "fields" Text :>
2039+ QueryParam "alt" Text :> Put '[JSON] Goal
18892040
18902041type WebpropertiesAPI =
18912042 WebpropertiesInsert :<|> WebpropertiesList :<|>
@@ -1897,73 +2048,90 @@ type WebpropertiesAPI =
18972048-- properties are visible in the Google Analytics interface only if they
18982049-- have at least one profile.
18992050type WebpropertiesInsert =
1900− "analytics" :> "v3" :> "management" :> "accounts" :>
1901− Capture "accountId" Text
1902− :> "webproperties"
1903− :> QueryParam "quotaUser" Text
1904− :> QueryParam "prettyPrint" Bool
1905− :> QueryParam "userIp" Text
1906− :> QueryParam "key" Text
1907− :> QueryParam "oauth_token" Text
1908− :> QueryParam "fields" Text
1909− :> QueryParam "alt" Text
2051+ "analytics" :>
2052+ "v3" :>
2053+ "management" :>
2054+ "accounts" :>
2055+ Capture "accountId" Text :>
2056+ "webproperties" :>
2057+ QueryParam "quotaUser" Text :>
2058+ QueryParam "prettyPrint" Bool :>
2059+ QueryParam "userIp" Text :>
2060+ QueryParam "key" Text :>
2061+ QueryParam "oauth_token" Text :>
2062+ QueryParam "fields" Text :>
2063+ QueryParam "alt" Text :> Post '[JSON] Webproperty
19102064
19112065-- | Lists web properties to which the user has access.
19122066type WebpropertiesList =
1913− "analytics" :> "v3" :> "management" :> "accounts" :>
1914− Capture "accountId" Text
1915− :> "webproperties"
1916− :> QueryParam "quotaUser" Text
1917− :> QueryParam "prettyPrint" Bool
1918− :> QueryParam "userIp" Text
1919− :> QueryParam "key" Text
1920− :> QueryParam "oauth_token" Text
1921− :> QueryParam "start-index" Natural
1922− :> QueryParam "max-results" Int32
1923− :> QueryParam "fields" Text
1924− :> QueryParam "alt" Text
2067+ "analytics" :>
2068+ "v3" :>
2069+ "management" :>
2070+ "accounts" :>
2071+ Capture "accountId" Text :>
2072+ "webproperties" :>
2073+ QueryParam "quotaUser" Text :>
2074+ QueryParam "prettyPrint" Bool :>
2075+ QueryParam "userIp" Text :>
2076+ QueryParam "key" Text :>
2077+ QueryParam "oauth_token" Text :>
2078+ QueryParam "start-index" Natural :>
2079+ QueryParam "max-results" Int32 :>
2080+ QueryParam "fields" Text :>
2081+ QueryParam "alt" Text :>
2082+ Get '[JSON] Webproperties
19252083
19262084-- | Updates an existing web property. This method supports patch semantics.
19272085type WebpropertiesPatch =
1928− "analytics" :> "v3" :> "management" :> "accounts" :>
1929− Capture "accountId" Text
1930− :> "webproperties"
1931− :> Capture "webPropertyId" Text
1932− :> QueryParam "quotaUser" Text
1933− :> QueryParam "prettyPrint" Bool
1934− :> QueryParam "userIp" Text
1935− :> QueryParam "key" Text
1936− :> QueryParam "oauth_token" Text
1937− :> QueryParam "fields" Text
1938− :> QueryParam "alt" Text
2086+ "analytics" :>
2087+ "v3" :>
2088+ "management" :>
2089+ "accounts" :>
2090+ Capture "accountId" Text :>
2091+ "webproperties" :>
2092+ Capture "webPropertyId" Text :>
2093+ QueryParam "quotaUser" Text :>
2094+ QueryParam "prettyPrint" Bool :>
2095+ QueryParam "userIp" Text :>
2096+ QueryParam "key" Text :>
2097+ QueryParam "oauth_token" Text :>
2098+ QueryParam "fields" Text :>
2099+ QueryParam "alt" Text :>
2100+ Patch '[JSON] Webproperty
19392101
19402102-- | Gets a web property to which the user has access.
19412103type WebpropertiesGet =
1942− "analytics" :> "v3" :> "management" :> "accounts" :>
1943− Capture "accountId" Text
1944− :> "webproperties"
1945− :> Capture "webPropertyId" Text
1946− :> QueryParam "quotaUser" Text
1947− :> QueryParam "prettyPrint" Bool
1948− :> QueryParam "userIp" Text
1949− :> QueryParam "key" Text
1950− :> QueryParam "oauth_token" Text
1951− :> QueryParam "fields" Text
1952− :> QueryParam "alt" Text
2104+ "analytics" :>
2105+ "v3" :>
2106+ "management" :>
2107+ "accounts" :>
2108+ Capture "accountId" Text :>
2109+ "webproperties" :>
2110+ Capture "webPropertyId" Text :>
2111+ QueryParam "quotaUser" Text :>
2112+ QueryParam "prettyPrint" Bool :>
2113+ QueryParam "userIp" Text :>
2114+ QueryParam "key" Text :>
2115+ QueryParam "oauth_token" Text :>
2116+ QueryParam "fields" Text :>
2117+ QueryParam "alt" Text :> Get '[JSON] Webproperty
19532118
19542119-- | Updates an existing web property.
19552120type WebpropertiesUpdate =
1956− "analytics" :> "v3" :> "management" :> "accounts" :>
1957− Capture "accountId" Text
1958− :> "webproperties"
1959− :> Capture "webPropertyId" Text
1960− :> QueryParam "quotaUser" Text
1961− :> QueryParam "prettyPrint" Bool
1962− :> QueryParam "userIp" Text
1963− :> QueryParam "key" Text
1964− :> QueryParam "oauth_token" Text
1965− :> QueryParam "fields" Text
1966− :> QueryParam "alt" Text
2121+ "analytics" :>
2122+ "v3" :>
2123+ "management" :>
2124+ "accounts" :>
2125+ Capture "accountId" Text :>
2126+ "webproperties" :>
2127+ Capture "webPropertyId" Text :>
2128+ QueryParam "quotaUser" Text :>
2129+ QueryParam "prettyPrint" Bool :>
2130+ QueryParam "userIp" Text :>
2131+ QueryParam "key" Text :>
2132+ QueryParam "oauth_token" Text :>
2133+ QueryParam "fields" Text :>
2134+ QueryParam "alt" Text :> Put '[JSON] Webproperty
19672135
19682136type CustomMetricsAPI =
19692137 CustomMetricsInsert :<|> CustomMetricsList :<|>
@@ -1973,85 +2141,105 @@ type CustomMetricsAPI =
19732141
19742142-- | Create a new custom metric.
19752143type CustomMetricsInsert =
1976− "analytics" :> "v3" :> "management" :> "accounts" :>
1977− Capture "accountId" Text
1978− :> "webproperties"
1979− :> Capture "webPropertyId" Text
1980− :> "customMetrics"
1981− :> QueryParam "quotaUser" Text
1982− :> QueryParam "prettyPrint" Bool
1983− :> QueryParam "userIp" Text
1984− :> QueryParam "key" Text
1985− :> QueryParam "oauth_token" Text
1986− :> QueryParam "fields" Text
1987− :> QueryParam "alt" Text
2144+ "analytics" :>
2145+ "v3" :>
2146+ "management" :>
2147+ "accounts" :>
2148+ Capture "accountId" Text :>
2149+ "webproperties" :>
2150+ Capture "webPropertyId" Text :>
2151+ "customMetrics" :>
2152+ QueryParam "quotaUser" Text :>
2153+ QueryParam "prettyPrint" Bool :>
2154+ QueryParam "userIp" Text :>
2155+ QueryParam "key" Text :>
2156+ QueryParam "oauth_token" Text :>
2157+ QueryParam "fields" Text :>
2158+ QueryParam "alt" Text :>
2159+ Post '[JSON] CustomMetric
19882160
19892161-- | Lists custom metrics to which the user has access.
19902162type CustomMetricsList =
1991− "analytics" :> "v3" :> "management" :> "accounts" :>
1992− Capture "accountId" Text
1993− :> "webproperties"
1994− :> Capture "webPropertyId" Text
1995− :> "customMetrics"
1996− :> QueryParam "quotaUser" Text
1997− :> QueryParam "prettyPrint" Bool
1998− :> QueryParam "userIp" Text
1999− :> QueryParam "key" Text
2000− :> QueryParam "oauth_token" Text
2001− :> QueryParam "start-index" Natural
2002− :> QueryParam "max-results" Int32
2003− :> QueryParam "fields" Text
2004− :> QueryParam "alt" Text
2163+ "analytics" :>
2164+ "v3" :>
2165+ "management" :>
2166+ "accounts" :>
2167+ Capture "accountId" Text :>
2168+ "webproperties" :>
2169+ Capture "webPropertyId" Text :>
2170+ "customMetrics" :>
2171+ QueryParam "quotaUser" Text :>
2172+ QueryParam "prettyPrint" Bool :>
2173+ QueryParam "userIp" Text :>
2174+ QueryParam "key" Text :>
2175+ QueryParam "oauth_token" Text :>
2176+ QueryParam "start-index" Natural :>
2177+ QueryParam "max-results" Int32 :>
2178+ QueryParam "fields" Text :>
2179+ QueryParam "alt" Text :>
2180+ Get '[JSON] CustomMetrics
20052181
20062182-- | Updates an existing custom metric. This method supports patch semantics.
20072183type CustomMetricsPatch =
2008− "analytics" :> "v3" :> "management" :> "accounts" :>
2009− Capture "accountId" Text
2010− :> "webproperties"
2011− :> Capture "webPropertyId" Text
2012− :> "customMetrics"
2013− :> Capture "customMetricId" Text
2014− :> QueryParam "quotaUser" Text
2015− :> QueryParam "prettyPrint" Bool
2016− :> QueryParam "ignoreCustomDataSourceLinks" Bool
2017− :> QueryParam "userIp" Text
2018− :> QueryParam "key" Text
2019− :> QueryParam "oauth_token" Text
2020− :> QueryParam "fields" Text
2021− :> QueryParam "alt" Text
2184+ "analytics" :>
2185+ "v3" :>
2186+ "management" :>
2187+ "accounts" :>
2188+ Capture "accountId" Text :>
2189+ "webproperties" :>
2190+ Capture "webPropertyId" Text :>
2191+ "customMetrics" :>
2192+ Capture "customMetricId" Text :>
2193+ QueryParam "quotaUser" Text :>
2194+ QueryParam "prettyPrint" Bool :>
2195+ QueryParam "ignoreCustomDataSourceLinks" Bool :>
2196+ QueryParam "userIp" Text :>
2197+ QueryParam "key" Text :>
2198+ QueryParam "oauth_token" Text :>
2199+ QueryParam "fields" Text :>
2200+ QueryParam "alt" Text :>
2201+ Patch '[JSON] CustomMetric
20222202
20232203-- | Get a custom metric to which the user has access.
20242204type CustomMetricsGet =
2025− "analytics" :> "v3" :> "management" :> "accounts" :>
2026− Capture "accountId" Text
2027− :> "webproperties"
2028− :> Capture "webPropertyId" Text
2029− :> "customMetrics"
2030− :> Capture "customMetricId" Text
2031− :> QueryParam "quotaUser" Text
2032− :> QueryParam "prettyPrint" Bool
2033− :> QueryParam "userIp" Text
2034− :> QueryParam "key" Text
2035− :> QueryParam "oauth_token" Text
2036− :> QueryParam "fields" Text
2037− :> QueryParam "alt" Text
2205+ "analytics" :>
2206+ "v3" :>
2207+ "management" :>
2208+ "accounts" :>
2209+ Capture "accountId" Text :>
2210+ "webproperties" :>
2211+ Capture "webPropertyId" Text :>
2212+ "customMetrics" :>
2213+ Capture "customMetricId" Text :>
2214+ QueryParam "quotaUser" Text :>
2215+ QueryParam "prettyPrint" Bool :>
2216+ QueryParam "userIp" Text :>
2217+ QueryParam "key" Text :>
2218+ QueryParam "oauth_token" Text :>
2219+ QueryParam "fields" Text :>
2220+ QueryParam "alt" Text :>
2221+ Get '[JSON] CustomMetric
20382222
20392223-- | Updates an existing custom metric.
20402224type CustomMetricsUpdate =
2041− "analytics" :> "v3" :> "management" :> "accounts" :>
2042− Capture "accountId" Text
2043− :> "webproperties"
2044− :> Capture "webPropertyId" Text
2045− :> "customMetrics"
2046− :> Capture "customMetricId" Text
2047− :> QueryParam "quotaUser" Text
2048− :> QueryParam "prettyPrint" Bool
2049− :> QueryParam "ignoreCustomDataSourceLinks" Bool
2050− :> QueryParam "userIp" Text
2051− :> QueryParam "key" Text
2052− :> QueryParam "oauth_token" Text
2053− :> QueryParam "fields" Text
2054− :> QueryParam "alt" Text
2225+ "analytics" :>
2226+ "v3" :>
2227+ "management" :>
2228+ "accounts" :>
2229+ Capture "accountId" Text :>
2230+ "webproperties" :>
2231+ Capture "webPropertyId" Text :>
2232+ "customMetrics" :>
2233+ Capture "customMetricId" Text :>
2234+ QueryParam "quotaUser" Text :>
2235+ QueryParam "prettyPrint" Bool :>
2236+ QueryParam "ignoreCustomDataSourceLinks" Bool :>
2237+ QueryParam "userIp" Text :>
2238+ QueryParam "key" Text :>
2239+ QueryParam "oauth_token" Text :>
2240+ QueryParam "fields" Text :>
2241+ QueryParam "alt" Text :>
2242+ Put '[JSON] CustomMetric
20552243
20562244type UploadsAPI =
20572245 UploadsList :<|> UploadsDeleteUploadData :<|>
@@ -2060,89 +2248,107 @@ type UploadsAPI =
20602248
20612249-- | List uploads to which the user has access.
20622250type UploadsList =
2063− "analytics" :> "v3" :> "management" :> "accounts" :>
2064− Capture "accountId" Text
2065− :> "webproperties"
2066− :> Capture "webPropertyId" Text
2067− :> "customDataSources"
2068− :> Capture "customDataSourceId" Text
2069− :> "uploads"
2070− :> QueryParam "quotaUser" Text
2071− :> QueryParam "prettyPrint" Bool
2072− :> QueryParam "userIp" Text
2073− :> QueryParam "key" Text
2074− :> QueryParam "oauth_token" Text
2075− :> QueryParam "start-index" Natural
2076− :> QueryParam "max-results" Natural
2077− :> QueryParam "fields" Text
2078− :> QueryParam "alt" Text
2251+ "analytics" :>
2252+ "v3" :>
2253+ "management" :>
2254+ "accounts" :>
2255+ Capture "accountId" Text :>
2256+ "webproperties" :>
2257+ Capture "webPropertyId" Text :>
2258+ "customDataSources" :>
2259+ Capture "customDataSourceId" Text :>
2260+ "uploads" :>
2261+ QueryParam "quotaUser" Text :>
2262+ QueryParam "prettyPrint" Bool :>
2263+ QueryParam "userIp" Text :>
2264+ QueryParam "key" Text :>
2265+ QueryParam "oauth_token" Text :>
2266+ QueryParam "start-index" Natural :>
2267+ QueryParam "max-results" Natural :>
2268+ QueryParam "fields" Text :>
2269+ QueryParam "alt" Text :>
2270+ Get '[JSON] Uploads
20792271
20802272-- | Delete data associated with a previous upload.
20812273type UploadsDeleteUploadData =
2082− "analytics" :> "v3" :> "management" :> "accounts" :>
2083− Capture "accountId" Text
2084− :> "webproperties"
2085− :> Capture "webPropertyId" Text
2086− :> "customDataSources"
2087− :> Capture "customDataSourceId" Text
2088− :> "deleteUploadData"
2089− :> QueryParam "quotaUser" Text
2090− :> QueryParam "prettyPrint" Bool
2091− :> QueryParam "userIp" Text
2092− :> QueryParam "key" Text
2093− :> QueryParam "oauth_token" Text
2094− :> QueryParam "fields" Text
2095− :> QueryParam "alt" Text
2274+ "analytics" :>
2275+ "v3" :>
2276+ "management" :>
2277+ "accounts" :>
2278+ Capture "accountId" Text :>
2279+ "webproperties" :>
2280+ Capture "webPropertyId" Text :>
2281+ "customDataSources" :>
2282+ Capture "customDataSourceId" Text :>
2283+ "deleteUploadData" :>
2284+ QueryParam "quotaUser" Text :>
2285+ QueryParam "prettyPrint" Bool :>
2286+ QueryParam "userIp" Text :>
2287+ QueryParam "key" Text :>
2288+ QueryParam "oauth_token" Text :>
2289+ QueryParam "fields" Text :>
2290+ QueryParam "alt" Text :> Post '[JSON] ()
20962291
20972292-- | List uploads to which the user has access.
20982293type UploadsGet =
2099− "analytics" :> "v3" :> "management" :> "accounts" :>
2100− Capture "accountId" Text
2101− :> "webproperties"
2102− :> Capture "webPropertyId" Text
2103− :> "customDataSources"
2104− :> Capture "customDataSourceId" Text
2105− :> "uploads"
2106− :> Capture "uploadId" Text
2107− :> QueryParam "quotaUser" Text
2108− :> QueryParam "prettyPrint" Bool
2109− :> QueryParam "userIp" Text
2110− :> QueryParam "key" Text
2111− :> QueryParam "oauth_token" Text
2112− :> QueryParam "fields" Text
2113− :> QueryParam "alt" Text
2294+ "analytics" :>
2295+ "v3" :>
2296+ "management" :>
2297+ "accounts" :>
2298+ Capture "accountId" Text :>
2299+ "webproperties" :>
2300+ Capture "webPropertyId" Text :>
2301+ "customDataSources" :>
2302+ Capture "customDataSourceId" Text :>
2303+ "uploads" :>
2304+ Capture "uploadId" Text :>
2305+ QueryParam "quotaUser" Text :>
2306+ QueryParam "prettyPrint" Bool :>
2307+ QueryParam "userIp" Text :>
2308+ QueryParam "key" Text :>
2309+ QueryParam "oauth_token" Text :>
2310+ QueryParam "fields" Text :>
2311+ QueryParam "alt" Text :>
2312+ Get '[JSON] Upload
21142313
21152314-- | Upload data for a custom data source.
21162315type UploadsUploadData =
2117− "analytics" :> "v3" :> "management" :> "accounts" :>
2118− Capture "accountId" Text
2119− :> "webproperties"
2120− :> Capture "webPropertyId" Text
2121− :> "customDataSources"
2122− :> Capture "customDataSourceId" Text
2123− :> "uploads"
2124− :> QueryParam "quotaUser" Text
2125− :> QueryParam "prettyPrint" Bool
2126− :> QueryParam "userIp" Text
2127− :> QueryParam "key" Text
2128− :> QueryParam "oauth_token" Text
2129− :> QueryParam "fields" Text
2130− :> QueryParam "alt" Text
2316+ "analytics" :>
2317+ "v3" :>
2318+ "management" :>
2319+ "accounts" :>
2320+ Capture "accountId" Text :>
2321+ "webproperties" :>
2322+ Capture "webPropertyId" Text :>
2323+ "customDataSources" :>
2324+ Capture "customDataSourceId" Text :>
2325+ "uploads" :>
2326+ QueryParam "quotaUser" Text :>
2327+ QueryParam "prettyPrint" Bool :>
2328+ QueryParam "userIp" Text :>
2329+ QueryParam "key" Text :>
2330+ QueryParam "oauth_token" Text :>
2331+ QueryParam "fields" Text :>
2332+ QueryParam "alt" Text :>
2333+ Post '[JSON] Upload
21312334
21322335type SegmentsAPI = SegmentsList
21332336
21342337-- | Lists segments to which the user has access.
21352338type SegmentsList =
2136− "analytics" :> "v3" :> "management" :> "segments" :>
2137− QueryParam "quotaUser" Text
2138− :> QueryParam "prettyPrint" Bool
2139− :> QueryParam "userIp" Text
2140− :> QueryParam "key" Text
2141− :> QueryParam "oauth_token" Text
2142− :> QueryParam "start-index" Natural
2143− :> QueryParam "max-results" Int32
2144− :> QueryParam "fields" Text
2145− :> QueryParam "alt" Text
2339+ "analytics" :>
2340+ "v3" :>
2341+ "management" :>
2342+ "segments" :>
2343+ QueryParam "quotaUser" Text :>
2344+ QueryParam "prettyPrint" Bool :>
2345+ QueryParam "userIp" Text :>
2346+ QueryParam "key" Text :>
2347+ QueryParam "oauth_token" Text :>
2348+ QueryParam "start-index" Natural :>
2349+ QueryParam "max-results" Int32 :>
2350+ QueryParam "fields" Text :>
2351+ QueryParam "alt" Text :> Get '[JSON] Segments
21462352
21472353type ProfileFilterLinksAPI =
21482354 ProfileFilterLinksInsert :<|> ProfileFilterLinksList
@@ -2153,112 +2359,136 @@ type ProfileFilterLinksAPI =
21532359
21542360-- | Create a new profile filter link.
21552361type ProfileFilterLinksInsert =
2156− "analytics" :> "v3" :> "management" :> "accounts" :>
2157− Capture "accountId" Text
2158− :> "webproperties"
2159− :> Capture "webPropertyId" Text
2160− :> "profiles"
2161− :> Capture "profileId" Text
2162− :> "profileFilterLinks"
2163− :> QueryParam "quotaUser" Text
2164− :> QueryParam "prettyPrint" Bool
2165− :> QueryParam "userIp" Text
2166− :> QueryParam "key" Text
2167− :> QueryParam "oauth_token" Text
2168− :> QueryParam "fields" Text
2169− :> QueryParam "alt" Text
2362+ "analytics" :>
2363+ "v3" :>
2364+ "management" :>
2365+ "accounts" :>
2366+ Capture "accountId" Text :>
2367+ "webproperties" :>
2368+ Capture "webPropertyId" Text :>
2369+ "profiles" :>
2370+ Capture "profileId" Text :>
2371+ "profileFilterLinks" :>
2372+ QueryParam "quotaUser" Text :>
2373+ QueryParam "prettyPrint" Bool :>
2374+ QueryParam "userIp" Text :>
2375+ QueryParam "key" Text :>
2376+ QueryParam "oauth_token" Text :>
2377+ QueryParam "fields" Text :>
2378+ QueryParam "alt" Text :>
2379+ Post '[JSON] ProfileFilterLink
21702380
21712381-- | Lists all profile filter links for a profile.
21722382type ProfileFilterLinksList =
2173− "analytics" :> "v3" :> "management" :> "accounts" :>
2174− Capture "accountId" Text
2175− :> "webproperties"
2176− :> Capture "webPropertyId" Text
2177− :> "profiles"
2178− :> Capture "profileId" Text
2179− :> "profileFilterLinks"
2180− :> QueryParam "quotaUser" Text
2181− :> QueryParam "prettyPrint" Bool
2182− :> QueryParam "userIp" Text
2183− :> QueryParam "key" Text
2184− :> QueryParam "oauth_token" Text
2185− :> QueryParam "start-index" Natural
2186− :> QueryParam "max-results" Int32
2187− :> QueryParam "fields" Text
2188− :> QueryParam "alt" Text
2383+ "analytics" :>
2384+ "v3" :>
2385+ "management" :>
2386+ "accounts" :>
2387+ Capture "accountId" Text :>
2388+ "webproperties" :>
2389+ Capture "webPropertyId" Text :>
2390+ "profiles" :>
2391+ Capture "profileId" Text :>
2392+ "profileFilterLinks" :>
2393+ QueryParam "quotaUser" Text :>
2394+ QueryParam "prettyPrint" Bool :>
2395+ QueryParam "userIp" Text :>
2396+ QueryParam "key" Text :>
2397+ QueryParam "oauth_token" Text :>
2398+ QueryParam "start-index" Natural :>
2399+ QueryParam "max-results" Int32 :>
2400+ QueryParam "fields" Text :>
2401+ QueryParam "alt" Text :>
2402+ Get '[JSON] ProfileFilterLinks
21892403
21902404-- | Update an existing profile filter link. This method supports patch
21912405-- semantics.
21922406type ProfileFilterLinksPatch =
2193− "analytics" :> "v3" :> "management" :> "accounts" :>
2194− Capture "accountId" Text
2195− :> "webproperties"
2196− :> Capture "webPropertyId" Text
2197− :> "profiles"
2198− :> Capture "profileId" Text
2199− :> "profileFilterLinks"
2200− :> Capture "linkId" Text
2201− :> QueryParam "quotaUser" Text
2202− :> QueryParam "prettyPrint" Bool
2203− :> QueryParam "userIp" Text
2204− :> QueryParam "key" Text
2205− :> QueryParam "oauth_token" Text
2206− :> QueryParam "fields" Text
2207− :> QueryParam "alt" Text
2407+ "analytics" :>
2408+ "v3" :>
2409+ "management" :>
2410+ "accounts" :>
2411+ Capture "accountId" Text :>
2412+ "webproperties" :>
2413+ Capture "webPropertyId" Text :>
2414+ "profiles" :>
2415+ Capture "profileId" Text :>
2416+ "profileFilterLinks" :>
2417+ Capture "linkId" Text :>
2418+ QueryParam "quotaUser" Text :>
2419+ QueryParam "prettyPrint" Bool :>
2420+ QueryParam "userIp" Text :>
2421+ QueryParam "key" Text :>
2422+ QueryParam "oauth_token" Text :>
2423+ QueryParam "fields" Text :>
2424+ QueryParam "alt" Text :>
2425+ Patch '[JSON] ProfileFilterLink
22082426
22092427-- | Returns a single profile filter link.
22102428type ProfileFilterLinksGet =
2211− "analytics" :> "v3" :> "management" :> "accounts" :>
2212− Capture "accountId" Text
2213− :> "webproperties"
2214− :> Capture "webPropertyId" Text
2215− :> "profiles"
2216− :> Capture "profileId" Text
2217− :> "profileFilterLinks"
2218− :> Capture "linkId" Text
2219− :> QueryParam "quotaUser" Text
2220− :> QueryParam "prettyPrint" Bool
2221− :> QueryParam "userIp" Text
2222− :> QueryParam "key" Text
2223− :> QueryParam "oauth_token" Text
2224− :> QueryParam "fields" Text
2225− :> QueryParam "alt" Text
2429+ "analytics" :>
2430+ "v3" :>
2431+ "management" :>
2432+ "accounts" :>
2433+ Capture "accountId" Text :>
2434+ "webproperties" :>
2435+ Capture "webPropertyId" Text :>
2436+ "profiles" :>
2437+ Capture "profileId" Text :>
2438+ "profileFilterLinks" :>
2439+ Capture "linkId" Text :>
2440+ QueryParam "quotaUser" Text :>
2441+ QueryParam "prettyPrint" Bool :>
2442+ QueryParam "userIp" Text :>
2443+ QueryParam "key" Text :>
2444+ QueryParam "oauth_token" Text :>
2445+ QueryParam "fields" Text :>
2446+ QueryParam "alt" Text :>
2447+ Get '[JSON] ProfileFilterLink
22262448
22272449-- | Delete a profile filter link.
22282450type ProfileFilterLinksDelete =
2229− "analytics" :> "v3" :> "management" :> "accounts" :>
2230− Capture "accountId" Text
2231− :> "webproperties"
2232− :> Capture "webPropertyId" Text
2233− :> "profiles"
2234− :> Capture "profileId" Text
2235− :> "profileFilterLinks"
2236− :> Capture "linkId" Text
2237− :> QueryParam "quotaUser" Text
2238− :> QueryParam "prettyPrint" Bool
2239− :> QueryParam "userIp" Text
2240− :> QueryParam "key" Text
2241− :> QueryParam "oauth_token" Text
2242− :> QueryParam "fields" Text
2243− :> QueryParam "alt" Text
2451+ "analytics" :>
2452+ "v3" :>
2453+ "management" :>
2454+ "accounts" :>
2455+ Capture "accountId" Text :>
2456+ "webproperties" :>
2457+ Capture "webPropertyId" Text :>
2458+ "profiles" :>
2459+ Capture "profileId" Text :>
2460+ "profileFilterLinks" :>
2461+ Capture "linkId" Text :>
2462+ QueryParam "quotaUser" Text :>
2463+ QueryParam "prettyPrint" Bool :>
2464+ QueryParam "userIp" Text :>
2465+ QueryParam "key" Text :>
2466+ QueryParam "oauth_token" Text :>
2467+ QueryParam "fields" Text :>
2468+ QueryParam "alt" Text :>
2469+ Delete '[JSON] ()
22442470
22452471-- | Update an existing profile filter link.
22462472type ProfileFilterLinksUpdate =
2247− "analytics" :> "v3" :> "management" :> "accounts" :>
2248− Capture "accountId" Text
2249− :> "webproperties"
2250− :> Capture "webPropertyId" Text
2251− :> "profiles"
2252− :> Capture "profileId" Text
2253− :> "profileFilterLinks"
2254− :> Capture "linkId" Text
2255− :> QueryParam "quotaUser" Text
2256− :> QueryParam "prettyPrint" Bool
2257− :> QueryParam "userIp" Text
2258− :> QueryParam "key" Text
2259− :> QueryParam "oauth_token" Text
2260− :> QueryParam "fields" Text
2261− :> QueryParam "alt" Text
2473+ "analytics" :>
2474+ "v3" :>
2475+ "management" :>
2476+ "accounts" :>
2477+ Capture "accountId" Text :>
2478+ "webproperties" :>
2479+ Capture "webPropertyId" Text :>
2480+ "profiles" :>
2481+ Capture "profileId" Text :>
2482+ "profileFilterLinks" :>
2483+ Capture "linkId" Text :>
2484+ QueryParam "quotaUser" Text :>
2485+ QueryParam "prettyPrint" Bool :>
2486+ QueryParam "userIp" Text :>
2487+ QueryParam "key" Text :>
2488+ QueryParam "oauth_token" Text :>
2489+ QueryParam "fields" Text :>
2490+ QueryParam "alt" Text :>
2491+ Put '[JSON] ProfileFilterLink
22622492
22632493type CustomDimensionsAPI =
22642494 CustomDimensionsInsert :<|> CustomDimensionsList :<|>
@@ -2268,86 +2498,106 @@ type CustomDimensionsAPI =
22682498
22692499-- | Create a new custom dimension.
22702500type CustomDimensionsInsert =
2271− "analytics" :> "v3" :> "management" :> "accounts" :>
2272− Capture "accountId" Text
2273− :> "webproperties"
2274− :> Capture "webPropertyId" Text
2275− :> "customDimensions"
2276− :> QueryParam "quotaUser" Text
2277− :> QueryParam "prettyPrint" Bool
2278− :> QueryParam "userIp" Text
2279− :> QueryParam "key" Text
2280− :> QueryParam "oauth_token" Text
2281− :> QueryParam "fields" Text
2282− :> QueryParam "alt" Text
2501+ "analytics" :>
2502+ "v3" :>
2503+ "management" :>
2504+ "accounts" :>
2505+ Capture "accountId" Text :>
2506+ "webproperties" :>
2507+ Capture "webPropertyId" Text :>
2508+ "customDimensions" :>
2509+ QueryParam "quotaUser" Text :>
2510+ QueryParam "prettyPrint" Bool :>
2511+ QueryParam "userIp" Text :>
2512+ QueryParam "key" Text :>
2513+ QueryParam "oauth_token" Text :>
2514+ QueryParam "fields" Text :>
2515+ QueryParam "alt" Text :>
2516+ Post '[JSON] CustomDimension
22832517
22842518-- | Lists custom dimensions to which the user has access.
22852519type CustomDimensionsList =
2286− "analytics" :> "v3" :> "management" :> "accounts" :>
2287− Capture "accountId" Text
2288− :> "webproperties"
2289− :> Capture "webPropertyId" Text
2290− :> "customDimensions"
2291− :> QueryParam "quotaUser" Text
2292− :> QueryParam "prettyPrint" Bool
2293− :> QueryParam "userIp" Text
2294− :> QueryParam "key" Text
2295− :> QueryParam "oauth_token" Text
2296− :> QueryParam "start-index" Natural
2297− :> QueryParam "max-results" Int32
2298− :> QueryParam "fields" Text
2299− :> QueryParam "alt" Text
2520+ "analytics" :>
2521+ "v3" :>
2522+ "management" :>
2523+ "accounts" :>
2524+ Capture "accountId" Text :>
2525+ "webproperties" :>
2526+ Capture "webPropertyId" Text :>
2527+ "customDimensions" :>
2528+ QueryParam "quotaUser" Text :>
2529+ QueryParam "prettyPrint" Bool :>
2530+ QueryParam "userIp" Text :>
2531+ QueryParam "key" Text :>
2532+ QueryParam "oauth_token" Text :>
2533+ QueryParam "start-index" Natural :>
2534+ QueryParam "max-results" Int32 :>
2535+ QueryParam "fields" Text :>
2536+ QueryParam "alt" Text :>
2537+ Get '[JSON] CustomDimensions
23002538
23012539-- | Updates an existing custom dimension. This method supports patch
23022540-- semantics.
23032541type CustomDimensionsPatch =
2304− "analytics" :> "v3" :> "management" :> "accounts" :>
2305− Capture "accountId" Text
2306− :> "webproperties"
2307− :> Capture "webPropertyId" Text
2308− :> "customDimensions"
2309− :> Capture "customDimensionId" Text
2310− :> QueryParam "quotaUser" Text
2311− :> QueryParam "prettyPrint" Bool
2312− :> QueryParam "ignoreCustomDataSourceLinks" Bool
2313− :> QueryParam "userIp" Text
2314− :> QueryParam "key" Text
2315− :> QueryParam "oauth_token" Text
2316− :> QueryParam "fields" Text
2317− :> QueryParam "alt" Text
2542+ "analytics" :>
2543+ "v3" :>
2544+ "management" :>
2545+ "accounts" :>
2546+ Capture "accountId" Text :>
2547+ "webproperties" :>
2548+ Capture "webPropertyId" Text :>
2549+ "customDimensions" :>
2550+ Capture "customDimensionId" Text :>
2551+ QueryParam "quotaUser" Text :>
2552+ QueryParam "prettyPrint" Bool :>
2553+ QueryParam "ignoreCustomDataSourceLinks" Bool :>
2554+ QueryParam "userIp" Text :>
2555+ QueryParam "key" Text :>
2556+ QueryParam "oauth_token" Text :>
2557+ QueryParam "fields" Text :>
2558+ QueryParam "alt" Text :>
2559+ Patch '[JSON] CustomDimension
23182560
23192561-- | Get a custom dimension to which the user has access.
23202562type CustomDimensionsGet =
2321− "analytics" :> "v3" :> "management" :> "accounts" :>
2322− Capture "accountId" Text
2323− :> "webproperties"
2324− :> Capture "webPropertyId" Text
2325− :> "customDimensions"
2326− :> Capture "customDimensionId" Text
2327− :> QueryParam "quotaUser" Text
2328− :> QueryParam "prettyPrint" Bool
2329− :> QueryParam "userIp" Text
2330− :> QueryParam "key" Text
2331− :> QueryParam "oauth_token" Text
2332− :> QueryParam "fields" Text
2333− :> QueryParam "alt" Text
2563+ "analytics" :>
2564+ "v3" :>
2565+ "management" :>
2566+ "accounts" :>
2567+ Capture "accountId" Text :>
2568+ "webproperties" :>
2569+ Capture "webPropertyId" Text :>
2570+ "customDimensions" :>
2571+ Capture "customDimensionId" Text :>
2572+ QueryParam "quotaUser" Text :>
2573+ QueryParam "prettyPrint" Bool :>
2574+ QueryParam "userIp" Text :>
2575+ QueryParam "key" Text :>
2576+ QueryParam "oauth_token" Text :>
2577+ QueryParam "fields" Text :>
2578+ QueryParam "alt" Text :>
2579+ Get '[JSON] CustomDimension
23342580
23352581-- | Updates an existing custom dimension.
23362582type CustomDimensionsUpdate =
2337− "analytics" :> "v3" :> "management" :> "accounts" :>
2338− Capture "accountId" Text
2339− :> "webproperties"
2340− :> Capture "webPropertyId" Text
2341− :> "customDimensions"
2342− :> Capture "customDimensionId" Text
2343− :> QueryParam "quotaUser" Text
2344− :> QueryParam "prettyPrint" Bool
2345− :> QueryParam "ignoreCustomDataSourceLinks" Bool
2346− :> QueryParam "userIp" Text
2347− :> QueryParam "key" Text
2348− :> QueryParam "oauth_token" Text
2349− :> QueryParam "fields" Text
2350− :> QueryParam "alt" Text
2583+ "analytics" :>
2584+ "v3" :>
2585+ "management" :>
2586+ "accounts" :>
2587+ Capture "accountId" Text :>
2588+ "webproperties" :>
2589+ Capture "webPropertyId" Text :>
2590+ "customDimensions" :>
2591+ Capture "customDimensionId" Text :>
2592+ QueryParam "quotaUser" Text :>
2593+ QueryParam "prettyPrint" Bool :>
2594+ QueryParam "ignoreCustomDataSourceLinks" Bool :>
2595+ QueryParam "userIp" Text :>
2596+ QueryParam "key" Text :>
2597+ QueryParam "oauth_token" Text :>
2598+ QueryParam "fields" Text :>
2599+ QueryParam "alt" Text :>
2600+ Put '[JSON] CustomDimension
23512601
23522602type AccountUserLinksAPI =
23532603 AccountUserLinksInsert :<|> AccountUserLinksList :<|>
@@ -2356,59 +2606,74 @@ type AccountUserLinksAPI =
23562606
23572607-- | Adds a new user to the given account.
23582608type AccountUserLinksInsert =
2359− "analytics" :> "v3" :> "management" :> "accounts" :>
2360− Capture "accountId" Text
2361− :> "entityUserLinks"
2362− :> QueryParam "quotaUser" Text
2363− :> QueryParam "prettyPrint" Bool
2364− :> QueryParam "userIp" Text
2365− :> QueryParam "key" Text
2366− :> QueryParam "oauth_token" Text
2367− :> QueryParam "fields" Text
2368− :> QueryParam "alt" Text
2609+ "analytics" :>
2610+ "v3" :>
2611+ "management" :>
2612+ "accounts" :>
2613+ Capture "accountId" Text :>
2614+ "entityUserLinks" :>
2615+ QueryParam "quotaUser" Text :>
2616+ QueryParam "prettyPrint" Bool :>
2617+ QueryParam "userIp" Text :>
2618+ QueryParam "key" Text :>
2619+ QueryParam "oauth_token" Text :>
2620+ QueryParam "fields" Text :>
2621+ QueryParam "alt" Text :>
2622+ Post '[JSON] EntityUserLink
23692623
23702624-- | Lists account-user links for a given account.
23712625type AccountUserLinksList =
2372− "analytics" :> "v3" :> "management" :> "accounts" :>
2373− Capture "accountId" Text
2374− :> "entityUserLinks"
2375− :> QueryParam "quotaUser" Text
2376− :> QueryParam "prettyPrint" Bool
2377− :> QueryParam "userIp" Text
2378− :> QueryParam "key" Text
2379− :> QueryParam "oauth_token" Text
2380− :> QueryParam "start-index" Natural
2381− :> QueryParam "max-results" Int32
2382− :> QueryParam "fields" Text
2383− :> QueryParam "alt" Text
2626+ "analytics" :>
2627+ "v3" :>
2628+ "management" :>
2629+ "accounts" :>
2630+ Capture "accountId" Text :>
2631+ "entityUserLinks" :>
2632+ QueryParam "quotaUser" Text :>
2633+ QueryParam "prettyPrint" Bool :>
2634+ QueryParam "userIp" Text :>
2635+ QueryParam "key" Text :>
2636+ QueryParam "oauth_token" Text :>
2637+ QueryParam "start-index" Natural :>
2638+ QueryParam "max-results" Int32 :>
2639+ QueryParam "fields" Text :>
2640+ QueryParam "alt" Text :>
2641+ Get '[JSON] EntityUserLinks
23842642
23852643-- | Removes a user from the given account.
23862644type AccountUserLinksDelete =
2387− "analytics" :> "v3" :> "management" :> "accounts" :>
2388− Capture "accountId" Text
2389− :> "entityUserLinks"
2390− :> Capture "linkId" Text
2391− :> QueryParam "quotaUser" Text
2392− :> QueryParam "prettyPrint" Bool
2393− :> QueryParam "userIp" Text
2394− :> QueryParam "key" Text
2395− :> QueryParam "oauth_token" Text
2396− :> QueryParam "fields" Text
2397− :> QueryParam "alt" Text
2645+ "analytics" :>
2646+ "v3" :>
2647+ "management" :>
2648+ "accounts" :>
2649+ Capture "accountId" Text :>
2650+ "entityUserLinks" :>
2651+ Capture "linkId" Text :>
2652+ QueryParam "quotaUser" Text :>
2653+ QueryParam "prettyPrint" Bool :>
2654+ QueryParam "userIp" Text :>
2655+ QueryParam "key" Text :>
2656+ QueryParam "oauth_token" Text :>
2657+ QueryParam "fields" Text :>
2658+ QueryParam "alt" Text :> Delete '[JSON] ()
23982659
23992660-- | Updates permissions for an existing user on the given account.
24002661type AccountUserLinksUpdate =
2401− "analytics" :> "v3" :> "management" :> "accounts" :>
2402− Capture "accountId" Text
2403− :> "entityUserLinks"
2404− :> Capture "linkId" Text
2405− :> QueryParam "quotaUser" Text
2406− :> QueryParam "prettyPrint" Bool
2407− :> QueryParam "userIp" Text
2408− :> QueryParam "key" Text
2409− :> QueryParam "oauth_token" Text
2410− :> QueryParam "fields" Text
2411− :> QueryParam "alt" Text
2662+ "analytics" :>
2663+ "v3" :>
2664+ "management" :>
2665+ "accounts" :>
2666+ Capture "accountId" Text :>
2667+ "entityUserLinks" :>
2668+ Capture "linkId" Text :>
2669+ QueryParam "quotaUser" Text :>
2670+ QueryParam "prettyPrint" Bool :>
2671+ QueryParam "userIp" Text :>
2672+ QueryParam "key" Text :>
2673+ QueryParam "oauth_token" Text :>
2674+ QueryParam "fields" Text :>
2675+ QueryParam "alt" Text :>
2676+ Put '[JSON] EntityUserLink
24122677
24132678type ProfileUserLinksAPI =
24142679 ProfileUserLinksInsert :<|> ProfileUserLinksList :<|>
@@ -2417,90 +2682,108 @@ type ProfileUserLinksAPI =
24172682
24182683-- | Adds a new user to the given view (profile).
24192684type ProfileUserLinksInsert =
2420− "analytics" :> "v3" :> "management" :> "accounts" :>
2421− Capture "accountId" Text
2422− :> "webproperties"
2423− :> Capture "webPropertyId" Text
2424− :> "profiles"
2425− :> Capture "profileId" Text
2426− :> "entityUserLinks"
2427− :> QueryParam "quotaUser" Text
2428− :> QueryParam "prettyPrint" Bool
2429− :> QueryParam "userIp" Text
2430− :> QueryParam "key" Text
2431− :> QueryParam "oauth_token" Text
2432− :> QueryParam "fields" Text
2433− :> QueryParam "alt" Text
2685+ "analytics" :>
2686+ "v3" :>
2687+ "management" :>
2688+ "accounts" :>
2689+ Capture "accountId" Text :>
2690+ "webproperties" :>
2691+ Capture "webPropertyId" Text :>
2692+ "profiles" :>
2693+ Capture "profileId" Text :>
2694+ "entityUserLinks" :>
2695+ QueryParam "quotaUser" Text :>
2696+ QueryParam "prettyPrint" Bool :>
2697+ QueryParam "userIp" Text :>
2698+ QueryParam "key" Text :>
2699+ QueryParam "oauth_token" Text :>
2700+ QueryParam "fields" Text :>
2701+ QueryParam "alt" Text :>
2702+ Post '[JSON] EntityUserLink
24342703
24352704-- | Lists profile-user links for a given view (profile).
24362705type ProfileUserLinksList =
2437− "analytics" :> "v3" :> "management" :> "accounts" :>
2438− Capture "accountId" Text
2439− :> "webproperties"
2440− :> Capture "webPropertyId" Text
2441− :> "profiles"
2442− :> Capture "profileId" Text
2443− :> "entityUserLinks"
2444− :> QueryParam "quotaUser" Text
2445− :> QueryParam "prettyPrint" Bool
2446− :> QueryParam "userIp" Text
2447− :> QueryParam "key" Text
2448− :> QueryParam "oauth_token" Text
2449− :> QueryParam "start-index" Natural
2450− :> QueryParam "max-results" Int32
2451− :> QueryParam "fields" Text
2452− :> QueryParam "alt" Text
2706+ "analytics" :>
2707+ "v3" :>
2708+ "management" :>
2709+ "accounts" :>
2710+ Capture "accountId" Text :>
2711+ "webproperties" :>
2712+ Capture "webPropertyId" Text :>
2713+ "profiles" :>
2714+ Capture "profileId" Text :>
2715+ "entityUserLinks" :>
2716+ QueryParam "quotaUser" Text :>
2717+ QueryParam "prettyPrint" Bool :>
2718+ QueryParam "userIp" Text :>
2719+ QueryParam "key" Text :>
2720+ QueryParam "oauth_token" Text :>
2721+ QueryParam "start-index" Natural :>
2722+ QueryParam "max-results" Int32 :>
2723+ QueryParam "fields" Text :>
2724+ QueryParam "alt" Text :>
2725+ Get '[JSON] EntityUserLinks
24532726
24542727-- | Removes a user from the given view (profile).
24552728type ProfileUserLinksDelete =
2456− "analytics" :> "v3" :> "management" :> "accounts" :>
2457− Capture "accountId" Text
2458− :> "webproperties"
2459− :> Capture "webPropertyId" Text
2460− :> "profiles"
2461− :> Capture "profileId" Text
2462− :> "entityUserLinks"
2463− :> Capture "linkId" Text
2464− :> QueryParam "quotaUser" Text
2465− :> QueryParam "prettyPrint" Bool
2466− :> QueryParam "userIp" Text
2467− :> QueryParam "key" Text
2468− :> QueryParam "oauth_token" Text
2469− :> QueryParam "fields" Text
2470− :> QueryParam "alt" Text
2729+ "analytics" :>
2730+ "v3" :>
2731+ "management" :>
2732+ "accounts" :>
2733+ Capture "accountId" Text :>
2734+ "webproperties" :>
2735+ Capture "webPropertyId" Text :>
2736+ "profiles" :>
2737+ Capture "profileId" Text :>
2738+ "entityUserLinks" :>
2739+ Capture "linkId" Text :>
2740+ QueryParam "quotaUser" Text :>
2741+ QueryParam "prettyPrint" Bool :>
2742+ QueryParam "userIp" Text :>
2743+ QueryParam "key" Text :>
2744+ QueryParam "oauth_token" Text :>
2745+ QueryParam "fields" Text :>
2746+ QueryParam "alt" Text :>
2747+ Delete '[JSON] ()
24712748
24722749-- | Updates permissions for an existing user on the given view (profile).
24732750type ProfileUserLinksUpdate =
2474− "analytics" :> "v3" :> "management" :> "accounts" :>
2475− Capture "accountId" Text
2476− :> "webproperties"
2477− :> Capture "webPropertyId" Text
2478− :> "profiles"
2479− :> Capture "profileId" Text
2480− :> "entityUserLinks"
2481− :> Capture "linkId" Text
2482− :> QueryParam "quotaUser" Text
2483− :> QueryParam "prettyPrint" Bool
2484− :> QueryParam "userIp" Text
2485− :> QueryParam "key" Text
2486− :> QueryParam "oauth_token" Text
2487− :> QueryParam "fields" Text
2488− :> QueryParam "alt" Text
2751+ "analytics" :>
2752+ "v3" :>
2753+ "management" :>
2754+ "accounts" :>
2755+ Capture "accountId" Text :>
2756+ "webproperties" :>
2757+ Capture "webPropertyId" Text :>
2758+ "profiles" :>
2759+ Capture "profileId" Text :>
2760+ "entityUserLinks" :>
2761+ Capture "linkId" Text :>
2762+ QueryParam "quotaUser" Text :>
2763+ QueryParam "prettyPrint" Bool :>
2764+ QueryParam "userIp" Text :>
2765+ QueryParam "key" Text :>
2766+ QueryParam "oauth_token" Text :>
2767+ QueryParam "fields" Text :>
2768+ QueryParam "alt" Text :>
2769+ Put '[JSON] EntityUserLink
24892770
24902771type ProvisioningAPI =
24912772 ProvisioningCreateAccountTicket
24922773
24932774-- | Creates an account ticket.
24942775type ProvisioningCreateAccountTicket =
2495− "analytics" :> "v3" :> "provisioning" :>
2496− "createAccountTicket"
2497− :> QueryParam "quotaUser" Text
2498− :> QueryParam "prettyPrint" Bool
2499− :> QueryParam "userIp" Text
2500− :> QueryParam "key" Text
2501− :> QueryParam "oauth_token" Text
2502− :> QueryParam "fields" Text
2503− :> QueryParam "alt" Text
2776+ "analytics" :>
2777+ "v3" :>
2778+ "provisioning" :>
2779+ "createAccountTicket" :>
2780+ QueryParam "quotaUser" Text :>
2781+ QueryParam "prettyPrint" Bool :>
2782+ QueryParam "userIp" Text :>
2783+ QueryParam "key" Text :>
2784+ QueryParam "oauth_token" Text :>
2785+ QueryParam "fields" Text :>
2786+ QueryParam "alt" Text :> Post '[JSON] AccountTicket
25042787
25052788type MetadataAPI = ColumnsAPI
25062789
@@ -2508,13 +2791,15 @@ type ColumnsAPI = ColumnsList
25082791
25092792-- | Lists all columns for a report type
25102793type ColumnsList =
2511− "analytics" :> "v3" :> "metadata" :>
2512− Capture "reportType" Text
2513− :> "columns"
2514− :> QueryParam "quotaUser" Text
2515− :> QueryParam "prettyPrint" Bool
2516− :> QueryParam "userIp" Text
2517− :> QueryParam "key" Text
2518− :> QueryParam "oauth_token" Text
2519− :> QueryParam "fields" Text
2520− :> QueryParam "alt" Text
2794+ "analytics" :>
2795+ "v3" :>
2796+ "metadata" :>
2797+ Capture "reportType" Text :>
2798+ "columns" :>
2799+ QueryParam "quotaUser" Text :>
2800+ QueryParam "prettyPrint" Bool :>
2801+ QueryParam "userIp" Text :>
2802+ QueryParam "key" Text :>
2803+ QueryParam "oauth_token" Text :>
2804+ QueryParam "fields" Text :>
2805+ QueryParam "alt" Text :> Get '[JSON] Columns
gogol-analytics/gen/Network/Google/Analytics/Types/Product.hs+2186
@@ -1,6 +1,7 @@
11{-# LANGUAGE DeriveDataTypeable #-}
22{-# LANGUAGE DeriveGeneric #-}
33{-# LANGUAGE OverloadedStrings #-}
4+{-# LANGUAGE RecordWildCards #-}
45
56{-# OPTIONS_GHC -fno-warn-unused-imports #-}
67
@@ -103,6 +104,32 @@ accPermissions
103104 = lens _accPermissions
104105 (\ s a -> s{_accPermissions = a})
105106
107+instance FromJSON Account where
108+ parseJSON
109+ = withObject "Account"
110+ (\ o ->
111+ Account <$>
112+ (o .:? "childLink") <*>
113+ (o .:? "kind" .!= "analytics#account")
114+ <*> (o .:? "created")
115+ <*> (o .:? "selfLink")
116+ <*> (o .:? "name")
117+ <*> (o .:? "id")
118+ <*> (o .:? "updated")
119+ <*> (o .:? "permissions"))
120+
121+instance ToJSON Account where
122+ toJSON Account{..}
123+ = object
124+ (catMaybes
125+ [("childLink" .=) <$> _accChildLink,
126+ Just ("kind" .= _accKind),
127+ ("created" .=) <$> _accCreated,
128+ ("selfLink" .=) <$> _accSelfLink,
129+ ("name" .=) <$> _accName, ("id" .=) <$> _accId,
130+ ("updated" .=) <$> _accUpdated,
131+ ("permissions" .=) <$> _accPermissions])
132+
106133-- | Child link for an account entry. Points to the list of web properties
107134-- for this account.
108135--
@@ -135,6 +162,21 @@ aclHref = lens _aclHref (\ s a -> s{_aclHref = a})
135162aclType :: Lens' AccountChildLink Text
136163aclType = lens _aclType (\ s a -> s{_aclType = a})
137164
165+instance FromJSON AccountChildLink where
166+ parseJSON
167+ = withObject "AccountChildLink"
168+ (\ o ->
169+ AccountChildLink <$>
170+ (o .:? "href") <*>
171+ (o .:? "type" .!= "analytics#webproperties"))
172+
173+instance ToJSON AccountChildLink where
174+ toJSON AccountChildLink{..}
175+ = object
176+ (catMaybes
177+ [("href" .=) <$> _aclHref,
178+ Just ("type" .= _aclType)])
179+
138180-- | Permissions the user has for this account.
139181--
140182-- /See:/ 'accountPermissions' smart constructor.
@@ -162,6 +204,18 @@ apEffective
162204 _Default
163205 . _Coerce
164206
207+instance FromJSON AccountPermissions where
208+ parseJSON
209+ = withObject "AccountPermissions"
210+ (\ o ->
211+ AccountPermissions <$>
212+ (o .:? "effective" .!= mempty))
213+
214+instance ToJSON AccountPermissions where
215+ toJSON AccountPermissions{..}
216+ = object
217+ (catMaybes [("effective" .=) <$> _apEffective])
218+
165219-- | JSON template for a linked account.
166220--
167221-- /See:/ 'accountRef' smart constructor.
@@ -209,6 +263,23 @@ arName = lens _arName (\ s a -> s{_arName = a})
209263arId :: Lens' AccountRef (Maybe Text)
210264arId = lens _arId (\ s a -> s{_arId = a})
211265
266+instance FromJSON AccountRef where
267+ parseJSON
268+ = withObject "AccountRef"
269+ (\ o ->
270+ AccountRef <$>
271+ (o .:? "kind" .!= "analytics#accountRef") <*>
272+ (o .:? "href")
273+ <*> (o .:? "name")
274+ <*> (o .:? "id"))
275+
276+instance ToJSON AccountRef where
277+ toJSON AccountRef{..}
278+ = object
279+ (catMaybes
280+ [Just ("kind" .= _arKind), ("href" .=) <$> _arHref,
281+ ("name" .=) <$> _arName, ("id" .=) <$> _arId])
282+
212283-- | An AccountSummary collection lists a summary of accounts, properties and
213284-- views (profiles) to which the user has access. Each resource in the
214285-- collection corresponds to a single AccountSummary.
@@ -308,6 +379,32 @@ assPreviousLink
308379 = lens _assPreviousLink
309380 (\ s a -> s{_assPreviousLink = a})
310381
382+instance FromJSON AccountSummaries where
383+ parseJSON
384+ = withObject "AccountSummaries"
385+ (\ o ->
386+ AccountSummaries <$>
387+ (o .:? "nextLink") <*> (o .:? "itemsPerPage") <*>
388+ (o .:? "kind" .!= "analytics#accountSummaries")
389+ <*> (o .:? "username")
390+ <*> (o .:? "items" .!= mempty)
391+ <*> (o .:? "totalResults")
392+ <*> (o .:? "startIndex")
393+ <*> (o .:? "previousLink"))
394+
395+instance ToJSON AccountSummaries where
396+ toJSON AccountSummaries{..}
397+ = object
398+ (catMaybes
399+ [("nextLink" .=) <$> _assNextLink,
400+ ("itemsPerPage" .=) <$> _assItemsPerPage,
401+ Just ("kind" .= _assKind),
402+ ("username" .=) <$> _assUsername,
403+ ("items" .=) <$> _assItems,
404+ ("totalResults" .=) <$> _assTotalResults,
405+ ("startIndex" .=) <$> _assStartIndex,
406+ ("previousLink" .=) <$> _assPreviousLink])
407+
311408-- | JSON template for an Analytics AccountSummary. An AccountSummary is a
312409-- lightweight tree comprised of properties\/profiles.
313410--
@@ -360,6 +457,24 @@ asName = lens _asName (\ s a -> s{_asName = a})
360457asId :: Lens' AccountSummary (Maybe Text)
361458asId = lens _asId (\ s a -> s{_asId = a})
362459
460+instance FromJSON AccountSummary where
461+ parseJSON
462+ = withObject "AccountSummary"
463+ (\ o ->
464+ AccountSummary <$>
465+ (o .:? "kind" .!= "analytics#accountSummary") <*>
466+ (o .:? "webProperties" .!= mempty)
467+ <*> (o .:? "name")
468+ <*> (o .:? "id"))
469+
470+instance ToJSON AccountSummary where
471+ toJSON AccountSummary{..}
472+ = object
473+ (catMaybes
474+ [Just ("kind" .= _asKind),
475+ ("webProperties" .=) <$> _asWebProperties,
476+ ("name" .=) <$> _asName, ("id" .=) <$> _asId])
477+
363478-- | JSON template for an Analytics account ticket. The account ticket
364479-- consists of the ticket ID and the basic information for the account,
365480-- property and profile.
@@ -432,6 +547,29 @@ atWebproperty
432547atId :: Lens' AccountTicket (Maybe Text)
433548atId = lens _atId (\ s a -> s{_atId = a})
434549
550+instance FromJSON AccountTicket where
551+ parseJSON
552+ = withObject "AccountTicket"
553+ (\ o ->
554+ AccountTicket <$>
555+ (o .:? "redirectUri") <*>
556+ (o .:? "kind" .!= "analytics#accountTicket")
557+ <*> (o .:? "profile")
558+ <*> (o .:? "account")
559+ <*> (o .:? "webproperty")
560+ <*> (o .:? "id"))
561+
562+instance ToJSON AccountTicket where
563+ toJSON AccountTicket{..}
564+ = object
565+ (catMaybes
566+ [("redirectUri" .=) <$> _atRedirectUri,
567+ Just ("kind" .= _atKind),
568+ ("profile" .=) <$> _atProfile,
569+ ("account" .=) <$> _atAccount,
570+ ("webproperty" .=) <$> _atWebproperty,
571+ ("id" .=) <$> _atId])
572+
435573-- | An account collection provides a list of Analytics accounts to which a
436574-- user has access. The account collection is the entry point to all
437575-- management information. Each resource in the collection corresponds to a
@@ -530,6 +668,32 @@ aPreviousLink
530668 = lens _aPreviousLink
531669 (\ s a -> s{_aPreviousLink = a})
532670
671+instance FromJSON Accounts where
672+ parseJSON
673+ = withObject "Accounts"
674+ (\ o ->
675+ Accounts <$>
676+ (o .:? "nextLink") <*> (o .:? "itemsPerPage") <*>
677+ (o .:? "kind" .!= "analytics#accounts")
678+ <*> (o .:? "username")
679+ <*> (o .:? "items" .!= mempty)
680+ <*> (o .:? "totalResults")
681+ <*> (o .:? "startIndex")
682+ <*> (o .:? "previousLink"))
683+
684+instance ToJSON Accounts where
685+ toJSON Accounts{..}
686+ = object
687+ (catMaybes
688+ [("nextLink" .=) <$> _aNextLink,
689+ ("itemsPerPage" .=) <$> _aItemsPerPage,
690+ Just ("kind" .= _aKind),
691+ ("username" .=) <$> _aUsername,
692+ ("items" .=) <$> _aItems,
693+ ("totalResults" .=) <$> _aTotalResults,
694+ ("startIndex" .=) <$> _aStartIndex,
695+ ("previousLink" .=) <$> _aPreviousLink])
696+
533697-- | JSON template for an AdWords account.
534698--
535699-- /See:/ 'adWordsAccount' smart constructor.
@@ -574,6 +738,24 @@ awaCustomerId
574738 = lens _awaCustomerId
575739 (\ s a -> s{_awaCustomerId = a})
576740
741+instance FromJSON AdWordsAccount where
742+ parseJSON
743+ = withObject "AdWordsAccount"
744+ (\ o ->
745+ AdWordsAccount <$>
746+ (o .:? "autoTaggingEnabled") <*>
747+ (o .:? "kind" .!= "analytics#adWordsAccount")
748+ <*> (o .:? "customerId"))
749+
750+instance ToJSON AdWordsAccount where
751+ toJSON AdWordsAccount{..}
752+ = object
753+ (catMaybes
754+ [("autoTaggingEnabled" .=) <$>
755+ _awaAutoTaggingEnabled,
756+ Just ("kind" .= _awaKind),
757+ ("customerId" .=) <$> _awaCustomerId])
758+
577759-- | Request template for the delete upload data request.
578760--
579761-- /See:/ 'analyticsDataimportDeleteUploadDataRequest' smart constructor.
@@ -601,6 +783,23 @@ addudrCustomDataImportUids
601783 . _Default
602784 . _Coerce
603785
786+instance FromJSON
787+ AnalyticsDataimportDeleteUploadDataRequest where
788+ parseJSON
789+ = withObject
790+ "AnalyticsDataimportDeleteUploadDataRequest"
791+ (\ o ->
792+ AnalyticsDataimportDeleteUploadDataRequest <$>
793+ (o .:? "customDataImportUids" .!= mempty))
794+
795+instance ToJSON
796+ AnalyticsDataimportDeleteUploadDataRequest where
797+ toJSON AnalyticsDataimportDeleteUploadDataRequest{..}
798+ = object
799+ (catMaybes
800+ [("customDataImportUids" .=) <$>
801+ _addudrCustomDataImportUids])
802+
604803-- | JSON template for a metadata column.
605804--
606805-- /See:/ 'column' smart constructor.
@@ -641,6 +840,23 @@ ccAttributes
641840ccId :: Lens' Column (Maybe Text)
642841ccId = lens _ccId (\ s a -> s{_ccId = a})
643842
843+instance FromJSON Column where
844+ parseJSON
845+ = withObject "Column"
846+ (\ o ->
847+ Column <$>
848+ (o .:? "kind" .!= "analytics#column") <*>
849+ (o .:? "attributes")
850+ <*> (o .:? "id"))
851+
852+instance ToJSON Column where
853+ toJSON Column{..}
854+ = object
855+ (catMaybes
856+ [Just ("kind" .= _ccKind),
857+ ("attributes" .=) <$> _ccAttributes,
858+ ("id" .=) <$> _ccId])
859+
644860-- | Map of attribute name and value for this column.
645861--
646862-- /See:/ 'columnAttributes' smart constructor.
@@ -654,6 +870,14 @@ columnAttributes
654870 :: ColumnAttributes
655871columnAttributes = ColumnAttributes
656872
873+instance FromJSON ColumnAttributes where
874+ parseJSON
875+ = withObject "ColumnAttributes"
876+ (\ o -> pure ColumnAttributes)
877+
878+instance ToJSON ColumnAttributes where
879+ toJSON = const (Object mempty)
880+
657881-- | Lists columns (dimensions and metrics) for a particular report type.
658882--
659883-- /See:/ 'columns' smart constructor.
@@ -719,6 +943,26 @@ colAttributeNames
719943 . _Default
720944 . _Coerce
721945
946+instance FromJSON Columns where
947+ parseJSON
948+ = withObject "Columns"
949+ (\ o ->
950+ Columns <$>
951+ (o .:? "etag") <*>
952+ (o .:? "kind" .!= "analytics#columns")
953+ <*> (o .:? "items" .!= mempty)
954+ <*> (o .:? "totalResults")
955+ <*> (o .:? "attributeNames" .!= mempty))
956+
957+instance ToJSON Columns where
958+ toJSON Columns{..}
959+ = object
960+ (catMaybes
961+ [("etag" .=) <$> _colEtag, Just ("kind" .= _colKind),
962+ ("items" .=) <$> _colItems,
963+ ("totalResults" .=) <$> _colTotalResults,
964+ ("attributeNames" .=) <$> _colAttributeNames])
965+
722966-- | JSON template for an Analytics custom data source.
723967--
724968-- /See:/ 'customDataSource' smart constructor.
@@ -872,6 +1116,45 @@ cdsProfilesLinked
8721116 . _Default
8731117 . _Coerce
8741118
1119+instance FromJSON CustomDataSource where
1120+ parseJSON
1121+ = withObject "CustomDataSource"
1122+ (\ o ->
1123+ CustomDataSource <$>
1124+ (o .:? "parentLink") <*> (o .:? "webPropertyId") <*>
1125+ (o .:? "childLink")
1126+ <*> (o .:? "kind" .!= "analytics#customDataSource")
1127+ <*> (o .:? "created")
1128+ <*> (o .:? "uploadType")
1129+ <*> (o .:? "importBehavior")
1130+ <*> (o .:? "selfLink")
1131+ <*> (o .:? "accountId")
1132+ <*> (o .:? "name")
1133+ <*> (o .:? "id")
1134+ <*> (o .:? "updated")
1135+ <*> (o .:? "type")
1136+ <*> (o .:? "description")
1137+ <*> (o .:? "profilesLinked" .!= mempty))
1138+
1139+instance ToJSON CustomDataSource where
1140+ toJSON CustomDataSource{..}
1141+ = object
1142+ (catMaybes
1143+ [("parentLink" .=) <$> _cdsParentLink,
1144+ ("webPropertyId" .=) <$> _cdsWebPropertyId,
1145+ ("childLink" .=) <$> _cdsChildLink,
1146+ Just ("kind" .= _cdsKind),
1147+ ("created" .=) <$> _cdsCreated,
1148+ ("uploadType" .=) <$> _cdsUploadType,
1149+ ("importBehavior" .=) <$> _cdsImportBehavior,
1150+ ("selfLink" .=) <$> _cdsSelfLink,
1151+ ("accountId" .=) <$> _cdsAccountId,
1152+ ("name" .=) <$> _cdsName, ("id" .=) <$> _cdsId,
1153+ ("updated" .=) <$> _cdsUpdated,
1154+ ("type" .=) <$> _cdsType,
1155+ ("description" .=) <$> _cdsDescription,
1156+ ("profilesLinked" .=) <$> _cdsProfilesLinked])
1157+
8751158--
8761159-- /See:/ 'customDataSourceChildLink' smart constructor.
8771160data CustomDataSourceChildLink = CustomDataSourceChildLink
@@ -905,6 +1188,20 @@ cdsclType :: Lens' CustomDataSourceChildLink (Maybe Text)
9051188cdsclType
9061189 = lens _cdsclType (\ s a -> s{_cdsclType = a})
9071190
1191+instance FromJSON CustomDataSourceChildLink where
1192+ parseJSON
1193+ = withObject "CustomDataSourceChildLink"
1194+ (\ o ->
1195+ CustomDataSourceChildLink <$>
1196+ (o .:? "href") <*> (o .:? "type"))
1197+
1198+instance ToJSON CustomDataSourceChildLink where
1199+ toJSON CustomDataSourceChildLink{..}
1200+ = object
1201+ (catMaybes
1202+ [("href" .=) <$> _cdsclHref,
1203+ ("type" .=) <$> _cdsclType])
1204+
9081205-- | Parent link for this custom data source. Points to the web property to
9091206-- which this custom data source belongs.
9101207--
@@ -939,6 +1236,21 @@ cdsplType :: Lens' CustomDataSourceParentLink Text
9391236cdsplType
9401237 = lens _cdsplType (\ s a -> s{_cdsplType = a})
9411238
1239+instance FromJSON CustomDataSourceParentLink where
1240+ parseJSON
1241+ = withObject "CustomDataSourceParentLink"
1242+ (\ o ->
1243+ CustomDataSourceParentLink <$>
1244+ (o .:? "href") <*>
1245+ (o .:? "type" .!= "analytics#webproperty"))
1246+
1247+instance ToJSON CustomDataSourceParentLink where
1248+ toJSON CustomDataSourceParentLink{..}
1249+ = object
1250+ (catMaybes
1251+ [("href" .=) <$> _cdsplHref,
1252+ Just ("type" .= _cdsplType)])
1253+
9421254-- | Lists Analytics custom data sources to which the user has access. Each
9431255-- resource in the collection corresponds to a single Analytics custom data
9441256-- source.
@@ -1038,6 +1350,32 @@ cdssPreviousLink
10381350 = lens _cdssPreviousLink
10391351 (\ s a -> s{_cdssPreviousLink = a})
10401352
1353+instance FromJSON CustomDataSources where
1354+ parseJSON
1355+ = withObject "CustomDataSources"
1356+ (\ o ->
1357+ CustomDataSources <$>
1358+ (o .:? "nextLink") <*> (o .:? "itemsPerPage") <*>
1359+ (o .:? "kind" .!= "analytics#customDataSources")
1360+ <*> (o .:? "username")
1361+ <*> (o .:? "items" .!= mempty)
1362+ <*> (o .:? "totalResults")
1363+ <*> (o .:? "startIndex")
1364+ <*> (o .:? "previousLink"))
1365+
1366+instance ToJSON CustomDataSources where
1367+ toJSON CustomDataSources{..}
1368+ = object
1369+ (catMaybes
1370+ [("nextLink" .=) <$> _cdssNextLink,
1371+ ("itemsPerPage" .=) <$> _cdssItemsPerPage,
1372+ Just ("kind" .= _cdssKind),
1373+ ("username" .=) <$> _cdssUsername,
1374+ ("items" .=) <$> _cdssItems,
1375+ ("totalResults" .=) <$> _cdssTotalResults,
1376+ ("startIndex" .=) <$> _cdssStartIndex,
1377+ ("previousLink" .=) <$> _cdssPreviousLink])
1378+
10411379-- | JSON template for Analytics Custom Dimension.
10421380--
10431381-- /See:/ 'customDimension' smart constructor.
@@ -1160,6 +1498,38 @@ cusUpdated
11601498cusIndex :: Lens' CustomDimension (Maybe Int32)
11611499cusIndex = lens _cusIndex (\ s a -> s{_cusIndex = a})
11621500
1501+instance FromJSON CustomDimension where
1502+ parseJSON
1503+ = withObject "CustomDimension"
1504+ (\ o ->
1505+ CustomDimension <$>
1506+ (o .:? "parentLink") <*> (o .:? "webPropertyId") <*>
1507+ (o .:? "kind" .!= "analytics#customDimension")
1508+ <*> (o .:? "created")
1509+ <*> (o .:? "active")
1510+ <*> (o .:? "selfLink")
1511+ <*> (o .:? "accountId")
1512+ <*> (o .:? "name")
1513+ <*> (o .:? "scope")
1514+ <*> (o .:? "id")
1515+ <*> (o .:? "updated")
1516+ <*> (o .:? "index"))
1517+
1518+instance ToJSON CustomDimension where
1519+ toJSON CustomDimension{..}
1520+ = object
1521+ (catMaybes
1522+ [("parentLink" .=) <$> _cusParentLink,
1523+ ("webPropertyId" .=) <$> _cusWebPropertyId,
1524+ Just ("kind" .= _cusKind),
1525+ ("created" .=) <$> _cusCreated,
1526+ ("active" .=) <$> _cusActive,
1527+ ("selfLink" .=) <$> _cusSelfLink,
1528+ ("accountId" .=) <$> _cusAccountId,
1529+ ("name" .=) <$> _cusName, ("scope" .=) <$> _cusScope,
1530+ ("id" .=) <$> _cusId, ("updated" .=) <$> _cusUpdated,
1531+ ("index" .=) <$> _cusIndex])
1532+
11631533-- | Parent link for the custom dimension. Points to the property to which
11641534-- the custom dimension belongs.
11651535--
@@ -1192,6 +1562,21 @@ cdplHref = lens _cdplHref (\ s a -> s{_cdplHref = a})
11921562cdplType :: Lens' CustomDimensionParentLink Text
11931563cdplType = lens _cdplType (\ s a -> s{_cdplType = a})
11941564
1565+instance FromJSON CustomDimensionParentLink where
1566+ parseJSON
1567+ = withObject "CustomDimensionParentLink"
1568+ (\ o ->
1569+ CustomDimensionParentLink <$>
1570+ (o .:? "href") <*>
1571+ (o .:? "type" .!= "analytics#webproperty"))
1572+
1573+instance ToJSON CustomDimensionParentLink where
1574+ toJSON CustomDimensionParentLink{..}
1575+ = object
1576+ (catMaybes
1577+ [("href" .=) <$> _cdplHref,
1578+ Just ("type" .= _cdplType)])
1579+
11951580-- | A custom dimension collection lists Analytics custom dimensions to which
11961581-- the user has access. Each resource in the collection corresponds to a
11971582-- single Analytics custom dimension.
@@ -1289,6 +1674,32 @@ cdPreviousLink
12891674 = lens _cdPreviousLink
12901675 (\ s a -> s{_cdPreviousLink = a})
12911676
1677+instance FromJSON CustomDimensions where
1678+ parseJSON
1679+ = withObject "CustomDimensions"
1680+ (\ o ->
1681+ CustomDimensions <$>
1682+ (o .:? "nextLink") <*> (o .:? "itemsPerPage") <*>
1683+ (o .:? "kind" .!= "analytics#customDimensions")
1684+ <*> (o .:? "username")
1685+ <*> (o .:? "items" .!= mempty)
1686+ <*> (o .:? "totalResults")
1687+ <*> (o .:? "startIndex")
1688+ <*> (o .:? "previousLink"))
1689+
1690+instance ToJSON CustomDimensions where
1691+ toJSON CustomDimensions{..}
1692+ = object
1693+ (catMaybes
1694+ [("nextLink" .=) <$> _cdNextLink,
1695+ ("itemsPerPage" .=) <$> _cdItemsPerPage,
1696+ Just ("kind" .= _cdKind),
1697+ ("username" .=) <$> _cdUsername,
1698+ ("items" .=) <$> _cdItems,
1699+ ("totalResults" .=) <$> _cdTotalResults,
1700+ ("startIndex" .=) <$> _cdStartIndex,
1701+ ("previousLink" .=) <$> _cdPreviousLink])
1702+
12921703-- | JSON template for Analytics Custom Metric.
12931704--
12941705-- /See:/ 'customMetric' smart constructor.
@@ -1433,6 +1844,43 @@ cType = lens _cType (\ s a -> s{_cType = a})
14331844cIndex :: Lens' CustomMetric (Maybe Int32)
14341845cIndex = lens _cIndex (\ s a -> s{_cIndex = a})
14351846
1847+instance FromJSON CustomMetric where
1848+ parseJSON
1849+ = withObject "CustomMetric"
1850+ (\ o ->
1851+ CustomMetric <$>
1852+ (o .:? "parentLink") <*> (o .:? "webPropertyId") <*>
1853+ (o .:? "kind" .!= "analytics#customMetric")
1854+ <*> (o .:? "max_value")
1855+ <*> (o .:? "created")
1856+ <*> (o .:? "min_value")
1857+ <*> (o .:? "active")
1858+ <*> (o .:? "selfLink")
1859+ <*> (o .:? "accountId")
1860+ <*> (o .:? "name")
1861+ <*> (o .:? "scope")
1862+ <*> (o .:? "id")
1863+ <*> (o .:? "updated")
1864+ <*> (o .:? "type")
1865+ <*> (o .:? "index"))
1866+
1867+instance ToJSON CustomMetric where
1868+ toJSON CustomMetric{..}
1869+ = object
1870+ (catMaybes
1871+ [("parentLink" .=) <$> _cParentLink,
1872+ ("webPropertyId" .=) <$> _cWebPropertyId,
1873+ Just ("kind" .= _cKind),
1874+ ("max_value" .=) <$> _cMaxValue,
1875+ ("created" .=) <$> _cCreated,
1876+ ("min_value" .=) <$> _cMinValue,
1877+ ("active" .=) <$> _cActive,
1878+ ("selfLink" .=) <$> _cSelfLink,
1879+ ("accountId" .=) <$> _cAccountId,
1880+ ("name" .=) <$> _cName, ("scope" .=) <$> _cScope,
1881+ ("id" .=) <$> _cId, ("updated" .=) <$> _cUpdated,
1882+ ("type" .=) <$> _cType, ("index" .=) <$> _cIndex])
1883+
14361884-- | Parent link for the custom metric. Points to the property to which the
14371885-- custom metric belongs.
14381886--
@@ -1465,6 +1913,21 @@ cmplHref = lens _cmplHref (\ s a -> s{_cmplHref = a})
14651913cmplType :: Lens' CustomMetricParentLink Text
14661914cmplType = lens _cmplType (\ s a -> s{_cmplType = a})
14671915
1916+instance FromJSON CustomMetricParentLink where
1917+ parseJSON
1918+ = withObject "CustomMetricParentLink"
1919+ (\ o ->
1920+ CustomMetricParentLink <$>
1921+ (o .:? "href") <*>
1922+ (o .:? "type" .!= "analytics#webproperty"))
1923+
1924+instance ToJSON CustomMetricParentLink where
1925+ toJSON CustomMetricParentLink{..}
1926+ = object
1927+ (catMaybes
1928+ [("href" .=) <$> _cmplHref,
1929+ Just ("type" .= _cmplType)])
1930+
14681931-- | A custom metric collection lists Analytics custom metrics to which the
14691932-- user has access. Each resource in the collection corresponds to a single
14701933-- Analytics custom metric.
@@ -1562,6 +2025,32 @@ cmPreviousLink
15622025 = lens _cmPreviousLink
15632026 (\ s a -> s{_cmPreviousLink = a})
15642027
2028+instance FromJSON CustomMetrics where
2029+ parseJSON
2030+ = withObject "CustomMetrics"
2031+ (\ o ->
2032+ CustomMetrics <$>
2033+ (o .:? "nextLink") <*> (o .:? "itemsPerPage") <*>
2034+ (o .:? "kind" .!= "analytics#customMetrics")
2035+ <*> (o .:? "username")
2036+ <*> (o .:? "items" .!= mempty)
2037+ <*> (o .:? "totalResults")
2038+ <*> (o .:? "startIndex")
2039+ <*> (o .:? "previousLink"))
2040+
2041+instance ToJSON CustomMetrics where
2042+ toJSON CustomMetrics{..}
2043+ = object
2044+ (catMaybes
2045+ [("nextLink" .=) <$> _cmNextLink,
2046+ ("itemsPerPage" .=) <$> _cmItemsPerPage,
2047+ Just ("kind" .= _cmKind),
2048+ ("username" .=) <$> _cmUsername,
2049+ ("items" .=) <$> _cmItems,
2050+ ("totalResults" .=) <$> _cmTotalResults,
2051+ ("startIndex" .=) <$> _cmStartIndex,
2052+ ("previousLink" .=) <$> _cmPreviousLink])
2053+
15652054-- | JSON template for Analytics Entity AdWords Link.
15662055--
15672056-- /See:/ 'entityAdWordsLink' smart constructor.
@@ -1644,6 +2133,30 @@ entEntity :: Lens' EntityAdWordsLink (Maybe EntityAdWordsLinkEntity)
16442133entEntity
16452134 = lens _entEntity (\ s a -> s{_entEntity = a})
16462135
2136+instance FromJSON EntityAdWordsLink where
2137+ parseJSON
2138+ = withObject "EntityAdWordsLink"
2139+ (\ o ->
2140+ EntityAdWordsLink <$>
2141+ (o .:? "adWordsAccounts" .!= mempty) <*>
2142+ (o .:? "profileIds" .!= mempty)
2143+ <*> (o .:? "kind" .!= "analytics#entityAdWordsLink")
2144+ <*> (o .:? "selfLink")
2145+ <*> (o .:? "name")
2146+ <*> (o .:? "id")
2147+ <*> (o .:? "entity"))
2148+
2149+instance ToJSON EntityAdWordsLink where
2150+ toJSON EntityAdWordsLink{..}
2151+ = object
2152+ (catMaybes
2153+ [("adWordsAccounts" .=) <$> _entAdWordsAccounts,
2154+ ("profileIds" .=) <$> _entProfileIds,
2155+ Just ("kind" .= _entKind),
2156+ ("selfLink" .=) <$> _entSelfLink,
2157+ ("name" .=) <$> _entName, ("id" .=) <$> _entId,
2158+ ("entity" .=) <$> _entEntity])
2159+
16472160-- | Web property being linked.
16482161--
16492162-- /See:/ 'entityAdWordsLinkEntity' smart constructor.
@@ -1668,6 +2181,18 @@ eawleWebPropertyRef
16682181 = lens _eawleWebPropertyRef
16692182 (\ s a -> s{_eawleWebPropertyRef = a})
16702183
2184+instance FromJSON EntityAdWordsLinkEntity where
2185+ parseJSON
2186+ = withObject "EntityAdWordsLinkEntity"
2187+ (\ o ->
2188+ EntityAdWordsLinkEntity <$> (o .:? "webPropertyRef"))
2189+
2190+instance ToJSON EntityAdWordsLinkEntity where
2191+ toJSON EntityAdWordsLinkEntity{..}
2192+ = object
2193+ (catMaybes
2194+ [("webPropertyRef" .=) <$> _eawleWebPropertyRef])
2195+
16712196-- | An entity AdWords link collection provides a list of GA-AdWords links
16722197-- Each resource in this collection corresponds to a single link.
16732198--
@@ -1757,6 +2282,30 @@ eawlPreviousLink
17572282 = lens _eawlPreviousLink
17582283 (\ s a -> s{_eawlPreviousLink = a})
17592284
2285+instance FromJSON EntityAdWordsLinks where
2286+ parseJSON
2287+ = withObject "EntityAdWordsLinks"
2288+ (\ o ->
2289+ EntityAdWordsLinks <$>
2290+ (o .:? "nextLink") <*> (o .:? "itemsPerPage") <*>
2291+ (o .:? "kind" .!= "analytics#entityAdWordsLinks")
2292+ <*> (o .:? "items" .!= mempty)
2293+ <*> (o .:? "totalResults")
2294+ <*> (o .:? "startIndex")
2295+ <*> (o .:? "previousLink"))
2296+
2297+instance ToJSON EntityAdWordsLinks where
2298+ toJSON EntityAdWordsLinks{..}
2299+ = object
2300+ (catMaybes
2301+ [("nextLink" .=) <$> _eawlNextLink,
2302+ ("itemsPerPage" .=) <$> _eawlItemsPerPage,
2303+ Just ("kind" .= _eawlKind),
2304+ ("items" .=) <$> _eawlItems,
2305+ ("totalResults" .=) <$> _eawlTotalResults,
2306+ ("startIndex" .=) <$> _eawlStartIndex,
2307+ ("previousLink" .=) <$> _eawlPreviousLink])
2308+
17602309-- | JSON template for an Analytics Entity-User Link. Returns permissions
17612310-- that a user has for an entity.
17622311--
@@ -1827,6 +2376,29 @@ eulEntity :: Lens' EntityUserLink (Maybe EntityUserLinkEntity)
18272376eulEntity
18282377 = lens _eulEntity (\ s a -> s{_eulEntity = a})
18292378
2379+instance FromJSON EntityUserLink where
2380+ parseJSON
2381+ = withObject "EntityUserLink"
2382+ (\ o ->
2383+ EntityUserLink <$>
2384+ (o .:? "kind" .!= "analytics#entityUserLink") <*>
2385+ (o .:? "userRef")
2386+ <*> (o .:? "selfLink")
2387+ <*> (o .:? "id")
2388+ <*> (o .:? "permissions")
2389+ <*> (o .:? "entity"))
2390+
2391+instance ToJSON EntityUserLink where
2392+ toJSON EntityUserLink{..}
2393+ = object
2394+ (catMaybes
2395+ [Just ("kind" .= _eulKind),
2396+ ("userRef" .=) <$> _eulUserRef,
2397+ ("selfLink" .=) <$> _eulSelfLink,
2398+ ("id" .=) <$> _eulId,
2399+ ("permissions" .=) <$> _eulPermissions,
2400+ ("entity" .=) <$> _eulEntity])
2401+
18302402-- | Entity for this link. It can be an account, a web property, or a view
18312403-- (profile).
18322404--
@@ -1873,6 +2445,22 @@ euleWebPropertyRef
18732445 = lens _euleWebPropertyRef
18742446 (\ s a -> s{_euleWebPropertyRef = a})
18752447
2448+instance FromJSON EntityUserLinkEntity where
2449+ parseJSON
2450+ = withObject "EntityUserLinkEntity"
2451+ (\ o ->
2452+ EntityUserLinkEntity <$>
2453+ (o .:? "profileRef") <*> (o .:? "accountRef") <*>
2454+ (o .:? "webPropertyRef"))
2455+
2456+instance ToJSON EntityUserLinkEntity where
2457+ toJSON EntityUserLinkEntity{..}
2458+ = object
2459+ (catMaybes
2460+ [("profileRef" .=) <$> _euleProfileRef,
2461+ ("accountRef" .=) <$> _euleAccountRef,
2462+ ("webPropertyRef" .=) <$> _euleWebPropertyRef])
2463+
18762464-- | Permissions the user has for this entity.
18772465--
18782466-- /See:/ 'entityUserLinkPermissions' smart constructor.
@@ -1916,6 +2504,21 @@ eulpEffective
19162504 . _Default
19172505 . _Coerce
19182506
2507+instance FromJSON EntityUserLinkPermissions where
2508+ parseJSON
2509+ = withObject "EntityUserLinkPermissions"
2510+ (\ o ->
2511+ EntityUserLinkPermissions <$>
2512+ (o .:? "local" .!= mempty) <*>
2513+ (o .:? "effective" .!= mempty))
2514+
2515+instance ToJSON EntityUserLinkPermissions where
2516+ toJSON EntityUserLinkPermissions{..}
2517+ = object
2518+ (catMaybes
2519+ [("local" .=) <$> _eulpLocal,
2520+ ("effective" .=) <$> _eulpEffective])
2521+
19192522-- | An entity user link collection provides a list of Analytics ACL links
19202523-- Each resource in this collection corresponds to a single link.
19212524--
@@ -2005,6 +2608,30 @@ eulsPreviousLink
20052608 = lens _eulsPreviousLink
20062609 (\ s a -> s{_eulsPreviousLink = a})
20072610
2611+instance FromJSON EntityUserLinks where
2612+ parseJSON
2613+ = withObject "EntityUserLinks"
2614+ (\ o ->
2615+ EntityUserLinks <$>
2616+ (o .:? "nextLink") <*> (o .:? "itemsPerPage") <*>
2617+ (o .:? "kind" .!= "analytics#entityUserLinks")
2618+ <*> (o .:? "items" .!= mempty)
2619+ <*> (o .:? "totalResults")
2620+ <*> (o .:? "startIndex")
2621+ <*> (o .:? "previousLink"))
2622+
2623+instance ToJSON EntityUserLinks where
2624+ toJSON EntityUserLinks{..}
2625+ = object
2626+ (catMaybes
2627+ [("nextLink" .=) <$> _eulsNextLink,
2628+ ("itemsPerPage" .=) <$> _eulsItemsPerPage,
2629+ Just ("kind" .= _eulsKind),
2630+ ("items" .=) <$> _eulsItems,
2631+ ("totalResults" .=) <$> _eulsTotalResults,
2632+ ("startIndex" .=) <$> _eulsStartIndex,
2633+ ("previousLink" .=) <$> _eulsPreviousLink])
2634+
20082635-- | JSON template for Analytics experiment resource.
20092636--
20102637-- /See:/ 'experiment' smart constructor.
@@ -2339,6 +2966,76 @@ expDescription
23392966 = lens _expDescription
23402967 (\ s a -> s{_expDescription = a})
23412968
2969+instance FromJSON Experiment where
2970+ parseJSON
2971+ = withObject "Experiment"
2972+ (\ o ->
2973+ Experiment <$>
2974+ (o .:? "parentLink") <*> (o .:? "equalWeighting") <*>
2975+ (o .:? "status")
2976+ <*> (o .:? "webPropertyId")
2977+ <*> (o .:? "startTime")
2978+ <*> (o .:? "snippet")
2979+ <*> (o .:? "kind" .!= "analytics#experiment")
2980+ <*> (o .:? "created")
2981+ <*> (o .:? "reasonExperimentEnded")
2982+ <*> (o .:? "trafficCoverage")
2983+ <*> (o .:? "editableInGaUi")
2984+ <*> (o .:? "minimumExperimentLengthInDays")
2985+ <*> (o .:? "profileId")
2986+ <*> (o .:? "optimizationType")
2987+ <*> (o .:? "selfLink")
2988+ <*> (o .:? "accountId")
2989+ <*> (o .:? "name")
2990+ <*> (o .:? "winnerFound")
2991+ <*> (o .:? "endTime")
2992+ <*> (o .:? "variations" .!= mempty)
2993+ <*> (o .:? "internalWebPropertyId")
2994+ <*> (o .:? "id")
2995+ <*> (o .:? "updated")
2996+ <*> (o .:? "rewriteVariationUrlsAsOriginal")
2997+ <*> (o .:? "objectiveMetric")
2998+ <*> (o .:? "winnerConfidenceLevel")
2999+ <*> (o .:? "servingFramework")
3000+ <*> (o .:? "description"))
3001+
3002+instance ToJSON Experiment where
3003+ toJSON Experiment{..}
3004+ = object
3005+ (catMaybes
3006+ [("parentLink" .=) <$> _expParentLink,
3007+ ("equalWeighting" .=) <$> _expEqualWeighting,
3008+ ("status" .=) <$> _expStatus,
3009+ ("webPropertyId" .=) <$> _expWebPropertyId,
3010+ ("startTime" .=) <$> _expStartTime,
3011+ ("snippet" .=) <$> _expSnippet,
3012+ Just ("kind" .= _expKind),
3013+ ("created" .=) <$> _expCreated,
3014+ ("reasonExperimentEnded" .=) <$>
3015+ _expReasonExperimentEnded,
3016+ ("trafficCoverage" .=) <$> _expTrafficCoverage,
3017+ ("editableInGaUi" .=) <$> _expEditableInGaUi,
3018+ ("minimumExperimentLengthInDays" .=) <$>
3019+ _expMinimumExperimentLengthInDays,
3020+ ("profileId" .=) <$> _expProfileId,
3021+ ("optimizationType" .=) <$> _expOptimizationType,
3022+ ("selfLink" .=) <$> _expSelfLink,
3023+ ("accountId" .=) <$> _expAccountId,
3024+ ("name" .=) <$> _expName,
3025+ ("winnerFound" .=) <$> _expWinnerFound,
3026+ ("endTime" .=) <$> _expEndTime,
3027+ ("variations" .=) <$> _expVariations,
3028+ ("internalWebPropertyId" .=) <$>
3029+ _expInternalWebPropertyId,
3030+ ("id" .=) <$> _expId, ("updated" .=) <$> _expUpdated,
3031+ ("rewriteVariationUrlsAsOriginal" .=) <$>
3032+ _expRewriteVariationUrlsAsOriginal,
3033+ ("objectiveMetric" .=) <$> _expObjectiveMetric,
3034+ ("winnerConfidenceLevel" .=) <$>
3035+ _expWinnerConfidenceLevel,
3036+ ("servingFramework" .=) <$> _expServingFramework,
3037+ ("description" .=) <$> _expDescription])
3038+
23423039--
23433040-- /See:/ 'experimentItemVariations' smart constructor.
23443041data ExperimentItemVariations = ExperimentItemVariations
@@ -2403,6 +3100,24 @@ eivWon = lens _eivWon (\ s a -> s{_eivWon = a})
24033100eivName :: Lens' ExperimentItemVariations (Maybe Text)
24043101eivName = lens _eivName (\ s a -> s{_eivName = a})
24053102
3103+instance FromJSON ExperimentItemVariations where
3104+ parseJSON
3105+ = withObject "ExperimentItemVariations"
3106+ (\ o ->
3107+ ExperimentItemVariations <$>
3108+ (o .:? "status") <*> (o .:? "weight") <*>
3109+ (o .:? "url")
3110+ <*> (o .:? "won")
3111+ <*> (o .:? "name"))
3112+
3113+instance ToJSON ExperimentItemVariations where
3114+ toJSON ExperimentItemVariations{..}
3115+ = object
3116+ (catMaybes
3117+ [("status" .=) <$> _eivStatus,
3118+ ("weight" .=) <$> _eivWeight, ("url" .=) <$> _eivUrl,
3119+ ("won" .=) <$> _eivWon, ("name" .=) <$> _eivName])
3120+
24063121-- | Parent link for an experiment. Points to the view (profile) to which
24073122-- this experiment belongs.
24083123--
@@ -2436,6 +3151,21 @@ eplHref = lens _eplHref (\ s a -> s{_eplHref = a})
24363151eplType :: Lens' ExperimentParentLink Text
24373152eplType = lens _eplType (\ s a -> s{_eplType = a})
24383153
3154+instance FromJSON ExperimentParentLink where
3155+ parseJSON
3156+ = withObject "ExperimentParentLink"
3157+ (\ o ->
3158+ ExperimentParentLink <$>
3159+ (o .:? "href") <*>
3160+ (o .:? "type" .!= "analytics#profile"))
3161+
3162+instance ToJSON ExperimentParentLink where
3163+ toJSON ExperimentParentLink{..}
3164+ = object
3165+ (catMaybes
3166+ [("href" .=) <$> _eplHref,
3167+ Just ("type" .= _eplType)])
3168+
24393169-- | An experiment collection lists Analytics experiments to which the user
24403170-- has access. Each view (profile) can have a set of experiments. Each
24413171-- resource in the Experiment collection corresponds to a single Analytics
@@ -2534,6 +3264,32 @@ ePreviousLink
25343264 = lens _ePreviousLink
25353265 (\ s a -> s{_ePreviousLink = a})
25363266
3267+instance FromJSON Experiments where
3268+ parseJSON
3269+ = withObject "Experiments"
3270+ (\ o ->
3271+ Experiments <$>
3272+ (o .:? "nextLink") <*> (o .:? "itemsPerPage") <*>
3273+ (o .:? "kind" .!= "analytics#experiments")
3274+ <*> (o .:? "username")
3275+ <*> (o .:? "items" .!= mempty)
3276+ <*> (o .:? "totalResults")
3277+ <*> (o .:? "startIndex")
3278+ <*> (o .:? "previousLink"))
3279+
3280+instance ToJSON Experiments where
3281+ toJSON Experiments{..}
3282+ = object
3283+ (catMaybes
3284+ [("nextLink" .=) <$> _eNextLink,
3285+ ("itemsPerPage" .=) <$> _eItemsPerPage,
3286+ Just ("kind" .= _eKind),
3287+ ("username" .=) <$> _eUsername,
3288+ ("items" .=) <$> _eItems,
3289+ ("totalResults" .=) <$> _eTotalResults,
3290+ ("startIndex" .=) <$> _eStartIndex,
3291+ ("previousLink" .=) <$> _ePreviousLink])
3292+
25373293-- | JSON template for an Analytics account filter.
25383294--
25393295-- /See:/ 'filter'' smart constructor.
@@ -2686,6 +3442,45 @@ fSearchAndReplaceDetails
26863442 = lens _fSearchAndReplaceDetails
26873443 (\ s a -> s{_fSearchAndReplaceDetails = a})
26883444
3445+instance FromJSON Filter where
3446+ parseJSON
3447+ = withObject "Filter"
3448+ (\ o ->
3449+ Filter <$>
3450+ (o .:? "parentLink") <*> (o .:? "advancedDetails")
3451+ <*> (o .:? "uppercaseDetails")
3452+ <*> (o .:? "lowercaseDetails")
3453+ <*> (o .:? "kind" .!= "analytics#filter")
3454+ <*> (o .:? "created")
3455+ <*> (o .:? "includeDetails")
3456+ <*> (o .:? "excludeDetails")
3457+ <*> (o .:? "selfLink")
3458+ <*> (o .:? "accountId")
3459+ <*> (o .:? "name")
3460+ <*> (o .:? "id")
3461+ <*> (o .:? "updated")
3462+ <*> (o .:? "type")
3463+ <*> (o .:? "searchAndReplaceDetails"))
3464+
3465+instance ToJSON Filter where
3466+ toJSON Filter{..}
3467+ = object
3468+ (catMaybes
3469+ [("parentLink" .=) <$> _fParentLink,
3470+ ("advancedDetails" .=) <$> _fAdvancedDetails,
3471+ ("uppercaseDetails" .=) <$> _fUppercaseDetails,
3472+ ("lowercaseDetails" .=) <$> _fLowercaseDetails,
3473+ Just ("kind" .= _fKind),
3474+ ("created" .=) <$> _fCreated,
3475+ ("includeDetails" .=) <$> _fIncludeDetails,
3476+ ("excludeDetails" .=) <$> _fExcludeDetails,
3477+ ("selfLink" .=) <$> _fSelfLink,
3478+ ("accountId" .=) <$> _fAccountId,
3479+ ("name" .=) <$> _fName, ("id" .=) <$> _fId,
3480+ ("updated" .=) <$> _fUpdated, ("type" .=) <$> _fType,
3481+ ("searchAndReplaceDetails" .=) <$>
3482+ _fSearchAndReplaceDetails])
3483+
26893484-- | Details for the filter of the type ADVANCED.
26903485--
26913486-- /See:/ 'filterAdvancedDetails' smart constructor.
@@ -2831,6 +3626,43 @@ fadOverrideOutputField
28313626 = lens _fadOverrideOutputField
28323627 (\ s a -> s{_fadOverrideOutputField = a})
28333628
3629+instance FromJSON FilterAdvancedDetails where
3630+ parseJSON
3631+ = withObject "FilterAdvancedDetails"
3632+ (\ o ->
3633+ FilterAdvancedDetails <$>
3634+ (o .:? "extractA") <*> (o .:? "fieldARequired") <*>
3635+ (o .:? "fieldA")
3636+ <*> (o .:? "fieldBIndex")
3637+ <*> (o .:? "outputToField")
3638+ <*> (o .:? "outputConstructor")
3639+ <*> (o .:? "extractB")
3640+ <*> (o .:? "fieldAIndex")
3641+ <*> (o .:? "caseSensitive")
3642+ <*> (o .:? "outputToFieldIndex")
3643+ <*> (o .:? "fieldB")
3644+ <*> (o .:? "fieldBRequired")
3645+ <*> (o .:? "overrideOutputField"))
3646+
3647+instance ToJSON FilterAdvancedDetails where
3648+ toJSON FilterAdvancedDetails{..}
3649+ = object
3650+ (catMaybes
3651+ [("extractA" .=) <$> _fadExtractA,
3652+ ("fieldARequired" .=) <$> _fadFieldARequired,
3653+ ("fieldA" .=) <$> _fadFieldA,
3654+ ("fieldBIndex" .=) <$> _fadFieldBIndex,
3655+ ("outputToField" .=) <$> _fadOutputToField,
3656+ ("outputConstructor" .=) <$> _fadOutputConstructor,
3657+ ("extractB" .=) <$> _fadExtractB,
3658+ ("fieldAIndex" .=) <$> _fadFieldAIndex,
3659+ ("caseSensitive" .=) <$> _fadCaseSensitive,
3660+ ("outputToFieldIndex" .=) <$> _fadOutputToFieldIndex,
3661+ ("fieldB" .=) <$> _fadFieldB,
3662+ ("fieldBRequired" .=) <$> _fadFieldBRequired,
3663+ ("overrideOutputField" .=) <$>
3664+ _fadOverrideOutputField])
3665+
28343666-- | JSON template for an Analytics filter expression.
28353667--
28363668-- /See:/ 'filterExpression' smart constructor.
@@ -2932,6 +3764,27 @@ feExpressionValue
29323764 = lens _feExpressionValue
29333765 (\ s a -> s{_feExpressionValue = a})
29343766
3767+instance FromJSON FilterExpression where
3768+ parseJSON
3769+ = withObject "FilterExpression"
3770+ (\ o ->
3771+ FilterExpression <$>
3772+ (o .:? "fieldIndex") <*> (o .:? "field") <*>
3773+ (o .:? "kind" .!= "analytics#filterExpression")
3774+ <*> (o .:? "matchType")
3775+ <*> (o .:? "caseSensitive")
3776+ <*> (o .:? "expressionValue"))
3777+
3778+instance ToJSON FilterExpression where
3779+ toJSON FilterExpression{..}
3780+ = object
3781+ (catMaybes
3782+ [("fieldIndex" .=) <$> _feFieldIndex,
3783+ ("field" .=) <$> _feField, Just ("kind" .= _feKind),
3784+ ("matchType" .=) <$> _feMatchType,
3785+ ("caseSensitive" .=) <$> _feCaseSensitive,
3786+ ("expressionValue" .=) <$> _feExpressionValue])
3787+
29353788-- | Details for the filter of the type LOWER.
29363789--
29373790-- /See:/ 'filterLowercaseDetails' smart constructor.
@@ -2966,6 +3819,20 @@ fldFieldIndex
29663819fldField :: Lens' FilterLowercaseDetails (Maybe Text)
29673820fldField = lens _fldField (\ s a -> s{_fldField = a})
29683821
3822+instance FromJSON FilterLowercaseDetails where
3823+ parseJSON
3824+ = withObject "FilterLowercaseDetails"
3825+ (\ o ->
3826+ FilterLowercaseDetails <$>
3827+ (o .:? "fieldIndex") <*> (o .:? "field"))
3828+
3829+instance ToJSON FilterLowercaseDetails where
3830+ toJSON FilterLowercaseDetails{..}
3831+ = object
3832+ (catMaybes
3833+ [("fieldIndex" .=) <$> _fldFieldIndex,
3834+ ("field" .=) <$> _fldField])
3835+
29693836-- | Parent link for this filter. Points to the account to which this filter
29703837-- belongs.
29713838--
@@ -2998,6 +3865,21 @@ fplHref = lens _fplHref (\ s a -> s{_fplHref = a})
29983865fplType :: Lens' FilterParentLink Text
29993866fplType = lens _fplType (\ s a -> s{_fplType = a})
30003867
3868+instance FromJSON FilterParentLink where
3869+ parseJSON
3870+ = withObject "FilterParentLink"
3871+ (\ o ->
3872+ FilterParentLink <$>
3873+ (o .:? "href") <*>
3874+ (o .:? "type" .!= "analytics#account"))
3875+
3876+instance ToJSON FilterParentLink where
3877+ toJSON FilterParentLink{..}
3878+ = object
3879+ (catMaybes
3880+ [("href" .=) <$> _fplHref,
3881+ Just ("type" .= _fplType)])
3882+
30013883-- | JSON template for a profile filter link.
30023884--
30033885-- /See:/ 'filterRef' smart constructor.
@@ -3054,6 +3936,25 @@ frName = lens _frName (\ s a -> s{_frName = a})
30543936frId :: Lens' FilterRef (Maybe Text)
30553937frId = lens _frId (\ s a -> s{_frId = a})
30563938
3939+instance FromJSON FilterRef where
3940+ parseJSON
3941+ = withObject "FilterRef"
3942+ (\ o ->
3943+ FilterRef <$>
3944+ (o .:? "kind" .!= "analytics#filterRef") <*>
3945+ (o .:? "href")
3946+ <*> (o .:? "accountId")
3947+ <*> (o .:? "name")
3948+ <*> (o .:? "id"))
3949+
3950+instance ToJSON FilterRef where
3951+ toJSON FilterRef{..}
3952+ = object
3953+ (catMaybes
3954+ [Just ("kind" .= _frKind), ("href" .=) <$> _frHref,
3955+ ("accountId" .=) <$> _frAccountId,
3956+ ("name" .=) <$> _frName, ("id" .=) <$> _frId])
3957+
30573958-- | Details for the filter of the type SEARCH_AND_REPLACE.
30583959--
30593960-- /See:/ 'filterSearchAndReplaceDetails' smart constructor.
@@ -3119,6 +4020,26 @@ fsardCaseSensitive
31194020 = lens _fsardCaseSensitive
31204021 (\ s a -> s{_fsardCaseSensitive = a})
31214022
4023+instance FromJSON FilterSearchAndReplaceDetails where
4024+ parseJSON
4025+ = withObject "FilterSearchAndReplaceDetails"
4026+ (\ o ->
4027+ FilterSearchAndReplaceDetails <$>
4028+ (o .:? "fieldIndex") <*> (o .:? "field") <*>
4029+ (o .:? "searchString")
4030+ <*> (o .:? "replaceString")
4031+ <*> (o .:? "caseSensitive"))
4032+
4033+instance ToJSON FilterSearchAndReplaceDetails where
4034+ toJSON FilterSearchAndReplaceDetails{..}
4035+ = object
4036+ (catMaybes
4037+ [("fieldIndex" .=) <$> _fsardFieldIndex,
4038+ ("field" .=) <$> _fsardField,
4039+ ("searchString" .=) <$> _fsardSearchString,
4040+ ("replaceString" .=) <$> _fsardReplaceString,
4041+ ("caseSensitive" .=) <$> _fsardCaseSensitive])
4042+
31224043-- | Details for the filter of the type UPPER.
31234044--
31244045-- /See:/ 'filterUppercaseDetails' smart constructor.
@@ -3153,6 +4074,20 @@ fudFieldIndex
31534074fudField :: Lens' FilterUppercaseDetails (Maybe Text)
31544075fudField = lens _fudField (\ s a -> s{_fudField = a})
31554076
4077+instance FromJSON FilterUppercaseDetails where
4078+ parseJSON
4079+ = withObject "FilterUppercaseDetails"
4080+ (\ o ->
4081+ FilterUppercaseDetails <$>
4082+ (o .:? "fieldIndex") <*> (o .:? "field"))
4083+
4084+instance ToJSON FilterUppercaseDetails where
4085+ toJSON FilterUppercaseDetails{..}
4086+ = object
4087+ (catMaybes
4088+ [("fieldIndex" .=) <$> _fudFieldIndex,
4089+ ("field" .=) <$> _fudField])
4090+
31564091-- | A filter collection lists filters created by users in an Analytics
31574092-- account. Each resource in the collection corresponds to a filter.
31584093--
@@ -3251,6 +4186,32 @@ filPreviousLink
32514186 = lens _filPreviousLink
32524187 (\ s a -> s{_filPreviousLink = a})
32534188
4189+instance FromJSON Filters where
4190+ parseJSON
4191+ = withObject "Filters"
4192+ (\ o ->
4193+ Filters <$>
4194+ (o .:? "nextLink") <*> (o .:? "itemsPerPage") <*>
4195+ (o .:? "kind" .!= "analytics#filters")
4196+ <*> (o .:? "username")
4197+ <*> (o .:? "items" .!= mempty)
4198+ <*> (o .:? "totalResults")
4199+ <*> (o .:? "startIndex")
4200+ <*> (o .:? "previousLink"))
4201+
4202+instance ToJSON Filters where
4203+ toJSON Filters{..}
4204+ = object
4205+ (catMaybes
4206+ [("nextLink" .=) <$> _filNextLink,
4207+ ("itemsPerPage" .=) <$> _filItemsPerPage,
4208+ Just ("kind" .= _filKind),
4209+ ("username" .=) <$> _filUsername,
4210+ ("items" .=) <$> _filItems,
4211+ ("totalResults" .=) <$> _filTotalResults,
4212+ ("startIndex" .=) <$> _filStartIndex,
4213+ ("previousLink" .=) <$> _filPreviousLink])
4214+
32544215-- | Analytics data for a given view (profile).
32554216--
32564217-- /See:/ 'gaData' smart constructor.
@@ -3427,6 +4388,50 @@ gdPreviousLink
34274388 = lens _gdPreviousLink
34284389 (\ s a -> s{_gdPreviousLink = a})
34294390
4391+instance FromJSON GaData where
4392+ parseJSON
4393+ = withObject "GaData"
4394+ (\ o ->
4395+ GaData <$>
4396+ (o .:? "nextLink") <*> (o .:? "sampleSpace") <*>
4397+ (o .:? "itemsPerPage")
4398+ <*> (o .:? "profileInfo")
4399+ <*> (o .:? "kind" .!= "analytics#gaData")
4400+ <*> (o .:? "sampleSize")
4401+ <*> (o .:? "rows" .!= mempty)
4402+ <*> (o .:? "selfLink")
4403+ <*> (o .:? "query")
4404+ <*> (o .:? "columnHeaders" .!= mempty)
4405+ <*> (o .:? "id")
4406+ <*> (o .:? "totalResults")
4407+ <*> (o .:? "dataTable")
4408+ <*> (o .:? "containsSampledData")
4409+ <*> (o .:? "totalsForAllResults")
4410+ <*> (o .:? "previousLink"))
4411+
4412+instance ToJSON GaData where
4413+ toJSON GaData{..}
4414+ = object
4415+ (catMaybes
4416+ [("nextLink" .=) <$> _gdNextLink,
4417+ ("sampleSpace" .=) <$> _gdSampleSpace,
4418+ ("itemsPerPage" .=) <$> _gdItemsPerPage,
4419+ ("profileInfo" .=) <$> _gdProfileInfo,
4420+ Just ("kind" .= _gdKind),
4421+ ("sampleSize" .=) <$> _gdSampleSize,
4422+ ("rows" .=) <$> _gdRows,
4423+ ("selfLink" .=) <$> _gdSelfLink,
4424+ ("query" .=) <$> _gdQuery,
4425+ ("columnHeaders" .=) <$> _gdColumnHeaders,
4426+ ("id" .=) <$> _gdId,
4427+ ("totalResults" .=) <$> _gdTotalResults,
4428+ ("dataTable" .=) <$> _gdDataTable,
4429+ ("containsSampledData" .=) <$>
4430+ _gdContainsSampledData,
4431+ ("totalsForAllResults" .=) <$>
4432+ _gdTotalsForAllResults,
4433+ ("previousLink" .=) <$> _gdPreviousLink])
4434+
34304435--
34314436-- /See:/ 'gaDataDataTable' smart constructor.
34324437data GaDataDataTable = GaDataDataTable
@@ -3461,6 +4466,21 @@ gddtRows
34614466 _Default
34624467 . _Coerce
34634468
4469+instance FromJSON GaDataDataTable where
4470+ parseJSON
4471+ = withObject "GaDataDataTable"
4472+ (\ o ->
4473+ GaDataDataTable <$>
4474+ (o .:? "cols" .!= mempty) <*>
4475+ (o .:? "rows" .!= mempty))
4476+
4477+instance ToJSON GaDataDataTable where
4478+ toJSON GaDataDataTable{..}
4479+ = object
4480+ (catMaybes
4481+ [("cols" .=) <$> _gddtCols,
4482+ ("rows" .=) <$> _gddtRows])
4483+
34644484--
34654485-- /See:/ 'gaDataItemCItemRowsDataTable' smart constructor.
34664486newtype GaDataItemCItemRowsDataTable = GaDataItemCItemRowsDataTable
@@ -3483,6 +4503,15 @@ gdicirdtV :: Lens' GaDataItemCItemRowsDataTable (Maybe Text)
34834503gdicirdtV
34844504 = lens _gdicirdtV (\ s a -> s{_gdicirdtV = a})
34854505
4506+instance FromJSON GaDataItemCItemRowsDataTable where
4507+ parseJSON
4508+ = withObject "GaDataItemCItemRowsDataTable"
4509+ (\ o -> GaDataItemCItemRowsDataTable <$> (o .:? "v"))
4510+
4511+instance ToJSON GaDataItemCItemRowsDataTable where
4512+ toJSON GaDataItemCItemRowsDataTable{..}
4513+ = object (catMaybes [("v" .=) <$> _gdicirdtV])
4514+
34864515--
34874516-- /See:/ 'gaDataItemColsDataTable' smart constructor.
34884517data GaDataItemColsDataTable = GaDataItemColsDataTable
@@ -3520,6 +4549,21 @@ gdicdtLabel :: Lens' GaDataItemColsDataTable (Maybe Text)
35204549gdicdtLabel
35214550 = lens _gdicdtLabel (\ s a -> s{_gdicdtLabel = a})
35224551
4552+instance FromJSON GaDataItemColsDataTable where
4553+ parseJSON
4554+ = withObject "GaDataItemColsDataTable"
4555+ (\ o ->
4556+ GaDataItemColsDataTable <$>
4557+ (o .:? "id") <*> (o .:? "type") <*> (o .:? "label"))
4558+
4559+instance ToJSON GaDataItemColsDataTable where
4560+ toJSON GaDataItemColsDataTable{..}
4561+ = object
4562+ (catMaybes
4563+ [("id" .=) <$> _gdicdtId,
4564+ ("type" .=) <$> _gdicdtType,
4565+ ("label" .=) <$> _gdicdtLabel])
4566+
35234567--
35244568-- /See:/ 'gaDataItemColumnHeaders' smart constructor.
35254569data GaDataItemColumnHeaders = GaDataItemColumnHeaders
@@ -3565,6 +4609,22 @@ gdichDataType
35654609 = lens _gdichDataType
35664610 (\ s a -> s{_gdichDataType = a})
35674611
4612+instance FromJSON GaDataItemColumnHeaders where
4613+ parseJSON
4614+ = withObject "GaDataItemColumnHeaders"
4615+ (\ o ->
4616+ GaDataItemColumnHeaders <$>
4617+ (o .:? "columnType") <*> (o .:? "name") <*>
4618+ (o .:? "dataType"))
4619+
4620+instance ToJSON GaDataItemColumnHeaders where
4621+ toJSON GaDataItemColumnHeaders{..}
4622+ = object
4623+ (catMaybes
4624+ [("columnType" .=) <$> _gdichColumnType,
4625+ ("name" .=) <$> _gdichName,
4626+ ("dataType" .=) <$> _gdichDataType])
4627+
35684628--
35694629-- /See:/ 'gaDataItemRowsDataTable' smart constructor.
35704630newtype GaDataItemRowsDataTable = GaDataItemRowsDataTable
@@ -3588,6 +4648,16 @@ gdirdtC
35884648 = lens _gdirdtC (\ s a -> s{_gdirdtC = a}) . _Default
35894649 . _Coerce
35904650
4651+instance FromJSON GaDataItemRowsDataTable where
4652+ parseJSON
4653+ = withObject "GaDataItemRowsDataTable"
4654+ (\ o ->
4655+ GaDataItemRowsDataTable <$> (o .:? "c" .!= mempty))
4656+
4657+instance ToJSON GaDataItemRowsDataTable where
4658+ toJSON GaDataItemRowsDataTable{..}
4659+ = object (catMaybes [("c" .=) <$> _gdirdtC])
4660+
35914661-- | Information for the view (profile), for which the Analytics data was
35924662-- requested.
35934663--
@@ -3663,6 +4733,29 @@ gdpiTableId :: Lens' GaDataProfileInfo (Maybe Text)
36634733gdpiTableId
36644734 = lens _gdpiTableId (\ s a -> s{_gdpiTableId = a})
36654735
4736+instance FromJSON GaDataProfileInfo where
4737+ parseJSON
4738+ = withObject "GaDataProfileInfo"
4739+ (\ o ->
4740+ GaDataProfileInfo <$>
4741+ (o .:? "webPropertyId") <*> (o .:? "profileId") <*>
4742+ (o .:? "profileName")
4743+ <*> (o .:? "accountId")
4744+ <*> (o .:? "internalWebPropertyId")
4745+ <*> (o .:? "tableId"))
4746+
4747+instance ToJSON GaDataProfileInfo where
4748+ toJSON GaDataProfileInfo{..}
4749+ = object
4750+ (catMaybes
4751+ [("webPropertyId" .=) <$> _gdpiWebPropertyId,
4752+ ("profileId" .=) <$> _gdpiProfileId,
4753+ ("profileName" .=) <$> _gdpiProfileName,
4754+ ("accountId" .=) <$> _gdpiAccountId,
4755+ ("internalWebPropertyId" .=) <$>
4756+ _gdpiInternalWebPropertyId,
4757+ ("tableId" .=) <$> _gdpiTableId])
4758+
36664759-- | Analytics data request query parameters.
36674760--
36684761-- /See:/ 'gaDataQuery' smart constructor.
@@ -3783,6 +4876,39 @@ gdqStartDate :: Lens' GaDataQuery (Maybe Text)
37834876gdqStartDate
37844877 = lens _gdqStartDate (\ s a -> s{_gdqStartDate = a})
37854878
4879+instance FromJSON GaDataQuery where
4880+ parseJSON
4881+ = withObject "GaDataQuery"
4882+ (\ o ->
4883+ GaDataQuery <$>
4884+ (o .:? "metrics" .!= mempty) <*>
4885+ (o .:? "samplingLevel")
4886+ <*> (o .:? "filters")
4887+ <*> (o .:? "ids")
4888+ <*> (o .:? "end-date")
4889+ <*> (o .:? "sort" .!= mempty)
4890+ <*> (o .:? "dimensions")
4891+ <*> (o .:? "start-index")
4892+ <*> (o .:? "max-results")
4893+ <*> (o .:? "segment")
4894+ <*> (o .:? "start-date"))
4895+
4896+instance ToJSON GaDataQuery where
4897+ toJSON GaDataQuery{..}
4898+ = object
4899+ (catMaybes
4900+ [("metrics" .=) <$> _gdqMetrics,
4901+ ("samplingLevel" .=) <$> _gdqSamplingLevel,
4902+ ("filters" .=) <$> _gdqFilters,
4903+ ("ids" .=) <$> _gdqIds,
4904+ ("end-date" .=) <$> _gdqEndDate,
4905+ ("sort" .=) <$> _gdqSort,
4906+ ("dimensions" .=) <$> _gdqDimensions,
4907+ ("start-index" .=) <$> _gdqStartIndex,
4908+ ("max-results" .=) <$> _gdqMaxResults,
4909+ ("segment" .=) <$> _gdqSegment,
4910+ ("start-date" .=) <$> _gdqStartDate])
4911+
37864912-- | Total values for the requested metrics over all the results, not just
37874913-- the results returned in this response. The order of the metric totals is
37884914-- same as the metric order specified in the request.
@@ -3798,6 +4924,14 @@ gaDataTotalsForAllResults
37984924 :: GaDataTotalsForAllResults
37994925gaDataTotalsForAllResults = GaDataTotalsForAllResults
38004926
4927+instance FromJSON GaDataTotalsForAllResults where
4928+ parseJSON
4929+ = withObject "GaDataTotalsForAllResults"
4930+ (\ o -> pure GaDataTotalsForAllResults)
4931+
4932+instance ToJSON GaDataTotalsForAllResults where
4933+ toJSON = const (Object mempty)
4934+
38014935-- | JSON template for Analytics goal resource.
38024936--
38034937-- /See:/ 'goal' smart constructor.
@@ -3976,6 +5110,56 @@ gUpdated = lens _gUpdated (\ s a -> s{_gUpdated = a})
39765110gType :: Lens' Goal (Maybe Text)
39775111gType = lens _gType (\ s a -> s{_gType = a})
39785112
5113+instance FromJSON Goal where
5114+ parseJSON
5115+ = withObject "Goal"
5116+ (\ o ->
5117+ Goal <$>
5118+ (o .:? "parentLink") <*> (o .:? "webPropertyId") <*>
5119+ (o .:? "kind" .!= "analytics#goal")
5120+ <*> (o .:? "created")
5121+ <*> (o .:? "value")
5122+ <*> (o .:? "profileId")
5123+ <*> (o .:? "eventDetails")
5124+ <*> (o .:? "active")
5125+ <*> (o .:? "selfLink")
5126+ <*> (o .:? "visitTimeOnSiteDetails")
5127+ <*> (o .:? "accountId")
5128+ <*> (o .:? "name")
5129+ <*> (o .:? "internalWebPropertyId")
5130+ <*> (o .:? "id")
5131+ <*> (o .:? "urlDestinationDetails")
5132+ <*> (o .:? "visitNumPagesDetails")
5133+ <*> (o .:? "updated")
5134+ <*> (o .:? "type"))
5135+
5136+instance ToJSON Goal where
5137+ toJSON Goal{..}
5138+ = object
5139+ (catMaybes
5140+ [("parentLink" .=) <$> _gParentLink,
5141+ ("webPropertyId" .=) <$> _gWebPropertyId,
5142+ Just ("kind" .= _gKind),
5143+ ("created" .=) <$> _gCreated,
5144+ ("value" .=) <$> _gValue,
5145+ ("profileId" .=) <$> _gProfileId,
5146+ ("eventDetails" .=) <$> _gEventDetails,
5147+ ("active" .=) <$> _gActive,
5148+ ("selfLink" .=) <$> _gSelfLink,
5149+ ("visitTimeOnSiteDetails" .=) <$>
5150+ _gVisitTimeOnSiteDetails,
5151+ ("accountId" .=) <$> _gAccountId,
5152+ ("name" .=) <$> _gName,
5153+ ("internalWebPropertyId" .=) <$>
5154+ _gInternalWebPropertyId,
5155+ ("id" .=) <$> _gId,
5156+ ("urlDestinationDetails" .=) <$>
5157+ _gUrlDestinationDetails,
5158+ ("visitNumPagesDetails" .=) <$>
5159+ _gVisitNumPagesDetails,
5160+ ("updated" .=) <$> _gUpdated,
5161+ ("type" .=) <$> _gType])
5162+
39795163-- | Details for the goal of the type EVENT.
39805164--
39815165-- /See:/ 'goalEventDetails' smart constructor.
@@ -4013,6 +5197,21 @@ gedEventConditions
40135197 . _Default
40145198 . _Coerce
40155199
5200+instance FromJSON GoalEventDetails where
5201+ parseJSON
5202+ = withObject "GoalEventDetails"
5203+ (\ o ->
5204+ GoalEventDetails <$>
5205+ (o .:? "useEventValue") <*>
5206+ (o .:? "eventConditions" .!= mempty))
5207+
5208+instance ToJSON GoalEventDetails where
5209+ toJSON GoalEventDetails{..}
5210+ = object
5211+ (catMaybes
5212+ [("useEventValue" .=) <$> _gedUseEventValue,
5213+ ("eventConditions" .=) <$> _gedEventConditions])
5214+
40165215--
40175216-- /See:/ 'goalItemEventConditionsEventDetails' smart constructor.
40185217data GoalItemEventConditionsEventDetails = GoalItemEventConditionsEventDetails
@@ -4079,6 +5278,28 @@ giecedComparisonType
40795278 = lens _giecedComparisonType
40805279 (\ s a -> s{_giecedComparisonType = a})
40815280
5281+instance FromJSON GoalItemEventConditionsEventDetails
5282+ where
5283+ parseJSON
5284+ = withObject "GoalItemEventConditionsEventDetails"
5285+ (\ o ->
5286+ GoalItemEventConditionsEventDetails <$>
5287+ (o .:? "matchType") <*> (o .:? "expression") <*>
5288+ (o .:? "comparisonValue")
5289+ <*> (o .:? "type")
5290+ <*> (o .:? "comparisonType"))
5291+
5292+instance ToJSON GoalItemEventConditionsEventDetails
5293+ where
5294+ toJSON GoalItemEventConditionsEventDetails{..}
5295+ = object
5296+ (catMaybes
5297+ [("matchType" .=) <$> _giecedMatchType,
5298+ ("expression" .=) <$> _giecedExpression,
5299+ ("comparisonValue" .=) <$> _giecedComparisonValue,
5300+ ("type" .=) <$> _giecedType,
5301+ ("comparisonType" .=) <$> _giecedComparisonType])
5302+
40825303--
40835304-- /See:/ 'goalItemStepsUrlDestinationDetails' smart constructor.
40845305data GoalItemStepsUrlDestinationDetails = GoalItemStepsUrlDestinationDetails
@@ -4120,6 +5341,24 @@ gisuddNumber :: Lens' GoalItemStepsUrlDestinationDetails (Maybe Int32)
41205341gisuddNumber
41215342 = lens _gisuddNumber (\ s a -> s{_gisuddNumber = a})
41225343
5344+instance FromJSON GoalItemStepsUrlDestinationDetails
5345+ where
5346+ parseJSON
5347+ = withObject "GoalItemStepsUrlDestinationDetails"
5348+ (\ o ->
5349+ GoalItemStepsUrlDestinationDetails <$>
5350+ (o .:? "url") <*> (o .:? "name") <*>
5351+ (o .:? "number"))
5352+
5353+instance ToJSON GoalItemStepsUrlDestinationDetails
5354+ where
5355+ toJSON GoalItemStepsUrlDestinationDetails{..}
5356+ = object
5357+ (catMaybes
5358+ [("url" .=) <$> _gisuddUrl,
5359+ ("name" .=) <$> _gisuddName,
5360+ ("number" .=) <$> _gisuddNumber])
5361+
41235362-- | Parent link for a goal. Points to the view (profile) to which this goal
41245363-- belongs.
41255364--
@@ -4152,6 +5391,21 @@ gplHref = lens _gplHref (\ s a -> s{_gplHref = a})
41525391gplType :: Lens' GoalParentLink Text
41535392gplType = lens _gplType (\ s a -> s{_gplType = a})
41545393
5394+instance FromJSON GoalParentLink where
5395+ parseJSON
5396+ = withObject "GoalParentLink"
5397+ (\ o ->
5398+ GoalParentLink <$>
5399+ (o .:? "href") <*>
5400+ (o .:? "type" .!= "analytics#profile"))
5401+
5402+instance ToJSON GoalParentLink where
5403+ toJSON GoalParentLink{..}
5404+ = object
5405+ (catMaybes
5406+ [("href" .=) <$> _gplHref,
5407+ Just ("type" .= _gplType)])
5408+
41555409-- | Details for the goal of the type URL_DESTINATION.
41565410--
41575411-- /See:/ 'goalUrlDestinationDetails' smart constructor.
@@ -4217,6 +5471,26 @@ guddFirstStepRequired
42175471 = lens _guddFirstStepRequired
42185472 (\ s a -> s{_guddFirstStepRequired = a})
42195473
5474+instance FromJSON GoalUrlDestinationDetails where
5475+ parseJSON
5476+ = withObject "GoalUrlDestinationDetails"
5477+ (\ o ->
5478+ GoalUrlDestinationDetails <$>
5479+ (o .:? "url") <*> (o .:? "matchType") <*>
5480+ (o .:? "steps" .!= mempty)
5481+ <*> (o .:? "caseSensitive")
5482+ <*> (o .:? "firstStepRequired"))
5483+
5484+instance ToJSON GoalUrlDestinationDetails where
5485+ toJSON GoalUrlDestinationDetails{..}
5486+ = object
5487+ (catMaybes
5488+ [("url" .=) <$> _guddUrl,
5489+ ("matchType" .=) <$> _guddMatchType,
5490+ ("steps" .=) <$> _guddSteps,
5491+ ("caseSensitive" .=) <$> _guddCaseSensitive,
5492+ ("firstStepRequired" .=) <$> _guddFirstStepRequired])
5493+
42205494-- | Details for the goal of the type VISIT_NUM_PAGES.
42215495--
42225496-- /See:/ 'goalVisitNumPagesDetails' smart constructor.
@@ -4253,6 +5527,21 @@ gvnpdComparisonType
42535527 = lens _gvnpdComparisonType
42545528 (\ s a -> s{_gvnpdComparisonType = a})
42555529
5530+instance FromJSON GoalVisitNumPagesDetails where
5531+ parseJSON
5532+ = withObject "GoalVisitNumPagesDetails"
5533+ (\ o ->
5534+ GoalVisitNumPagesDetails <$>
5535+ (o .:? "comparisonValue") <*>
5536+ (o .:? "comparisonType"))
5537+
5538+instance ToJSON GoalVisitNumPagesDetails where
5539+ toJSON GoalVisitNumPagesDetails{..}
5540+ = object
5541+ (catMaybes
5542+ [("comparisonValue" .=) <$> _gvnpdComparisonValue,
5543+ ("comparisonType" .=) <$> _gvnpdComparisonType])
5544+
42565545-- | Details for the goal of the type VISIT_TIME_ON_SITE.
42575546--
42585547-- /See:/ 'goalVisitTimeOnSiteDetails' smart constructor.
@@ -4288,6 +5577,21 @@ gvtosdComparisonType
42885577 = lens _gvtosdComparisonType
42895578 (\ s a -> s{_gvtosdComparisonType = a})
42905579
5580+instance FromJSON GoalVisitTimeOnSiteDetails where
5581+ parseJSON
5582+ = withObject "GoalVisitTimeOnSiteDetails"
5583+ (\ o ->
5584+ GoalVisitTimeOnSiteDetails <$>
5585+ (o .:? "comparisonValue") <*>
5586+ (o .:? "comparisonType"))
5587+
5588+instance ToJSON GoalVisitTimeOnSiteDetails where
5589+ toJSON GoalVisitTimeOnSiteDetails{..}
5590+ = object
5591+ (catMaybes
5592+ [("comparisonValue" .=) <$> _gvtosdComparisonValue,
5593+ ("comparisonType" .=) <$> _gvtosdComparisonType])
5594+
42915595-- | A goal collection lists Analytics goals to which the user has access.
42925596-- Each view (profile) can have a set of goals. Each resource in the Goal
42935597-- collection corresponds to a single Analytics goal.
@@ -4387,6 +5691,32 @@ goaPreviousLink
43875691 = lens _goaPreviousLink
43885692 (\ s a -> s{_goaPreviousLink = a})
43895693
5694+instance FromJSON Goals where
5695+ parseJSON
5696+ = withObject "Goals"
5697+ (\ o ->
5698+ Goals <$>
5699+ (o .:? "nextLink") <*> (o .:? "itemsPerPage") <*>
5700+ (o .:? "kind" .!= "analytics#goals")
5701+ <*> (o .:? "username")
5702+ <*> (o .:? "items" .!= mempty)
5703+ <*> (o .:? "totalResults")
5704+ <*> (o .:? "startIndex")
5705+ <*> (o .:? "previousLink"))
5706+
5707+instance ToJSON Goals where
5708+ toJSON Goals{..}
5709+ = object
5710+ (catMaybes
5711+ [("nextLink" .=) <$> _goaNextLink,
5712+ ("itemsPerPage" .=) <$> _goaItemsPerPage,
5713+ Just ("kind" .= _goaKind),
5714+ ("username" .=) <$> _goaUsername,
5715+ ("items" .=) <$> _goaItems,
5716+ ("totalResults" .=) <$> _goaTotalResults,
5717+ ("startIndex" .=) <$> _goaStartIndex,
5718+ ("previousLink" .=) <$> _goaPreviousLink])
5719+
43905720-- | Multi-Channel Funnels data for a given view (profile).
43915721--
43925722-- /See:/ 'mcfData' smart constructor.
@@ -4555,6 +5885,48 @@ mdPreviousLink
45555885 = lens _mdPreviousLink
45565886 (\ s a -> s{_mdPreviousLink = a})
45575887
5888+instance FromJSON McfData where
5889+ parseJSON
5890+ = withObject "McfData"
5891+ (\ o ->
5892+ McfData <$>
5893+ (o .:? "nextLink") <*> (o .:? "sampleSpace") <*>
5894+ (o .:? "itemsPerPage")
5895+ <*> (o .:? "profileInfo")
5896+ <*> (o .:? "kind" .!= "analytics#mcfData")
5897+ <*> (o .:? "sampleSize")
5898+ <*> (o .:? "rows" .!= mempty)
5899+ <*> (o .:? "selfLink")
5900+ <*> (o .:? "query")
5901+ <*> (o .:? "columnHeaders" .!= mempty)
5902+ <*> (o .:? "id")
5903+ <*> (o .:? "totalResults")
5904+ <*> (o .:? "containsSampledData")
5905+ <*> (o .:? "totalsForAllResults")
5906+ <*> (o .:? "previousLink"))
5907+
5908+instance ToJSON McfData where
5909+ toJSON McfData{..}
5910+ = object
5911+ (catMaybes
5912+ [("nextLink" .=) <$> _mdNextLink,
5913+ ("sampleSpace" .=) <$> _mdSampleSpace,
5914+ ("itemsPerPage" .=) <$> _mdItemsPerPage,
5915+ ("profileInfo" .=) <$> _mdProfileInfo,
5916+ Just ("kind" .= _mdKind),
5917+ ("sampleSize" .=) <$> _mdSampleSize,
5918+ ("rows" .=) <$> _mdRows,
5919+ ("selfLink" .=) <$> _mdSelfLink,
5920+ ("query" .=) <$> _mdQuery,
5921+ ("columnHeaders" .=) <$> _mdColumnHeaders,
5922+ ("id" .=) <$> _mdId,
5923+ ("totalResults" .=) <$> _mdTotalResults,
5924+ ("containsSampledData" .=) <$>
5925+ _mdContainsSampledData,
5926+ ("totalsForAllResults" .=) <$>
5927+ _mdTotalsForAllResults,
5928+ ("previousLink" .=) <$> _mdPreviousLink])
5929+
45585930--
45595931-- /See:/ 'mcfDataItemColumnHeaders' smart constructor.
45605932data McfDataItemColumnHeaders = McfDataItemColumnHeaders
@@ -4599,6 +5971,22 @@ mdichDataType
45995971 = lens _mdichDataType
46005972 (\ s a -> s{_mdichDataType = a})
46015973
5974+instance FromJSON McfDataItemColumnHeaders where
5975+ parseJSON
5976+ = withObject "McfDataItemColumnHeaders"
5977+ (\ o ->
5978+ McfDataItemColumnHeaders <$>
5979+ (o .:? "columnType") <*> (o .:? "name") <*>
5980+ (o .:? "dataType"))
5981+
5982+instance ToJSON McfDataItemColumnHeaders where
5983+ toJSON McfDataItemColumnHeaders{..}
5984+ = object
5985+ (catMaybes
5986+ [("columnType" .=) <$> _mdichColumnType,
5987+ ("name" .=) <$> _mdichName,
5988+ ("dataType" .=) <$> _mdichDataType])
5989+
46025990--
46035991-- /See:/ 'mcfDataItemConversionPathValueItemItemRows' smart constructor.
46045992data McfDataItemConversionPathValueItemItemRows = McfDataItemConversionPathValueItemItemRows
@@ -4635,6 +6023,24 @@ mdicpviirNodeValue
46356023 = lens _mdicpviirNodeValue
46366024 (\ s a -> s{_mdicpviirNodeValue = a})
46376025
6026+instance FromJSON
6027+ McfDataItemConversionPathValueItemItemRows where
6028+ parseJSON
6029+ = withObject
6030+ "McfDataItemConversionPathValueItemItemRows"
6031+ (\ o ->
6032+ McfDataItemConversionPathValueItemItemRows <$>
6033+ (o .:? "interactionType") <*> (o .:? "nodeValue"))
6034+
6035+instance ToJSON
6036+ McfDataItemConversionPathValueItemItemRows where
6037+ toJSON McfDataItemConversionPathValueItemItemRows{..}
6038+ = object
6039+ (catMaybes
6040+ [("interactionType" .=) <$>
6041+ _mdicpviirInteractionType,
6042+ ("nodeValue" .=) <$> _mdicpviirNodeValue])
6043+
46386044-- | A union object representing a dimension or metric value. Only one of
46396045-- \"primitiveValue\" or \"conversionPathValue\" attribute will be
46406046-- populated.
@@ -4675,6 +6081,22 @@ mdiirConversionPathValue
46756081 . _Default
46766082 . _Coerce
46776083
6084+instance FromJSON McfDataItemItemRows where
6085+ parseJSON
6086+ = withObject "McfDataItemItemRows"
6087+ (\ o ->
6088+ McfDataItemItemRows <$>
6089+ (o .:? "primitiveValue") <*>
6090+ (o .:? "conversionPathValue" .!= mempty))
6091+
6092+instance ToJSON McfDataItemItemRows where
6093+ toJSON McfDataItemItemRows{..}
6094+ = object
6095+ (catMaybes
6096+ [("primitiveValue" .=) <$> _mdiirPrimitiveValue,
6097+ ("conversionPathValue" .=) <$>
6098+ _mdiirConversionPathValue])
6099+
46786100-- | Information for the view (profile), for which the Analytics data was
46796101-- requested.
46806102--
@@ -4750,6 +6172,29 @@ mdpiTableId :: Lens' McfDataProfileInfo (Maybe Text)
47506172mdpiTableId
47516173 = lens _mdpiTableId (\ s a -> s{_mdpiTableId = a})
47526174
6175+instance FromJSON McfDataProfileInfo where
6176+ parseJSON
6177+ = withObject "McfDataProfileInfo"
6178+ (\ o ->
6179+ McfDataProfileInfo <$>
6180+ (o .:? "webPropertyId") <*> (o .:? "profileId") <*>
6181+ (o .:? "profileName")
6182+ <*> (o .:? "accountId")
6183+ <*> (o .:? "internalWebPropertyId")
6184+ <*> (o .:? "tableId"))
6185+
6186+instance ToJSON McfDataProfileInfo where
6187+ toJSON McfDataProfileInfo{..}
6188+ = object
6189+ (catMaybes
6190+ [("webPropertyId" .=) <$> _mdpiWebPropertyId,
6191+ ("profileId" .=) <$> _mdpiProfileId,
6192+ ("profileName" .=) <$> _mdpiProfileName,
6193+ ("accountId" .=) <$> _mdpiAccountId,
6194+ ("internalWebPropertyId" .=) <$>
6195+ _mdpiInternalWebPropertyId,
6196+ ("tableId" .=) <$> _mdpiTableId])
6197+
47536198-- | Analytics data request query parameters.
47546199--
47556200-- /See:/ 'mcfDataQuery' smart constructor.
@@ -4870,6 +6315,39 @@ mdqStartDate :: Lens' McfDataQuery (Maybe Text)
48706315mdqStartDate
48716316 = lens _mdqStartDate (\ s a -> s{_mdqStartDate = a})
48726317
6318+instance FromJSON McfDataQuery where
6319+ parseJSON
6320+ = withObject "McfDataQuery"
6321+ (\ o ->
6322+ McfDataQuery <$>
6323+ (o .:? "metrics" .!= mempty) <*>
6324+ (o .:? "samplingLevel")
6325+ <*> (o .:? "filters")
6326+ <*> (o .:? "ids")
6327+ <*> (o .:? "end-date")
6328+ <*> (o .:? "sort" .!= mempty)
6329+ <*> (o .:? "dimensions")
6330+ <*> (o .:? "start-index")
6331+ <*> (o .:? "max-results")
6332+ <*> (o .:? "segment")
6333+ <*> (o .:? "start-date"))
6334+
6335+instance ToJSON McfDataQuery where
6336+ toJSON McfDataQuery{..}
6337+ = object
6338+ (catMaybes
6339+ [("metrics" .=) <$> _mdqMetrics,
6340+ ("samplingLevel" .=) <$> _mdqSamplingLevel,
6341+ ("filters" .=) <$> _mdqFilters,
6342+ ("ids" .=) <$> _mdqIds,
6343+ ("end-date" .=) <$> _mdqEndDate,
6344+ ("sort" .=) <$> _mdqSort,
6345+ ("dimensions" .=) <$> _mdqDimensions,
6346+ ("start-index" .=) <$> _mdqStartIndex,
6347+ ("max-results" .=) <$> _mdqMaxResults,
6348+ ("segment" .=) <$> _mdqSegment,
6349+ ("start-date" .=) <$> _mdqStartDate])
6350+
48736351-- | Total values for the requested metrics over all the results, not just
48746352-- the results returned in this response. The order of the metric totals is
48756353-- same as the metric order specified in the request.
@@ -4885,6 +6363,14 @@ mcfDataTotalsForAllResults
48856363 :: McfDataTotalsForAllResults
48866364mcfDataTotalsForAllResults = McfDataTotalsForAllResults
48876365
6366+instance FromJSON McfDataTotalsForAllResults where
6367+ parseJSON
6368+ = withObject "McfDataTotalsForAllResults"
6369+ (\ o -> pure McfDataTotalsForAllResults)
6370+
6371+instance ToJSON McfDataTotalsForAllResults where
6372+ toJSON = const (Object mempty)
6373+
48886374-- | JSON template for an Analytics view (profile).
48896375--
48906376-- /See:/ 'profile' smart constructor.
@@ -5135,6 +6621,70 @@ ppStripSiteSearchQueryParameters
51356621 = lens _ppStripSiteSearchQueryParameters
51366622 (\ s a -> s{_ppStripSiteSearchQueryParameters = a})
51376623
6624+instance FromJSON Profile where
6625+ parseJSON
6626+ = withObject "Profile"
6627+ (\ o ->
6628+ Profile <$>
6629+ (o .:? "parentLink") <*> (o .:? "eCommerceTracking")
6630+ <*> (o .:? "siteSearchCategoryParameters")
6631+ <*> (o .:? "webPropertyId")
6632+ <*> (o .:? "childLink")
6633+ <*> (o .:? "siteSearchQueryParameters")
6634+ <*> (o .:? "kind" .!= "analytics#profile")
6635+ <*> (o .:? "defaultPage")
6636+ <*> (o .:? "created")
6637+ <*> (o .:? "selfLink")
6638+ <*> (o .:? "accountId")
6639+ <*> (o .:? "name")
6640+ <*> (o .:? "currency")
6641+ <*> (o .:? "internalWebPropertyId")
6642+ <*> (o .:? "id")
6643+ <*> (o .:? "updated")
6644+ <*> (o .:? "permissions")
6645+ <*> (o .:? "websiteUrl")
6646+ <*> (o .:? "type")
6647+ <*> (o .:? "stripSiteSearchCategoryParameters")
6648+ <*> (o .:? "timezone")
6649+ <*> (o .:? "excludeQueryParameters")
6650+ <*> (o .:? "enhancedECommerceTracking")
6651+ <*> (o .:? "stripSiteSearchQueryParameters"))
6652+
6653+instance ToJSON Profile where
6654+ toJSON Profile{..}
6655+ = object
6656+ (catMaybes
6657+ [("parentLink" .=) <$> _ppParentLink,
6658+ ("eCommerceTracking" .=) <$> _ppECommerceTracking,
6659+ ("siteSearchCategoryParameters" .=) <$>
6660+ _ppSiteSearchCategoryParameters,
6661+ ("webPropertyId" .=) <$> _ppWebPropertyId,
6662+ ("childLink" .=) <$> _ppChildLink,
6663+ ("siteSearchQueryParameters" .=) <$>
6664+ _ppSiteSearchQueryParameters,
6665+ Just ("kind" .= _ppKind),
6666+ ("defaultPage" .=) <$> _ppDefaultPage,
6667+ ("created" .=) <$> _ppCreated,
6668+ ("selfLink" .=) <$> _ppSelfLink,
6669+ ("accountId" .=) <$> _ppAccountId,
6670+ ("name" .=) <$> _ppName,
6671+ ("currency" .=) <$> _ppCurrency,
6672+ ("internalWebPropertyId" .=) <$>
6673+ _ppInternalWebPropertyId,
6674+ ("id" .=) <$> _ppId, ("updated" .=) <$> _ppUpdated,
6675+ ("permissions" .=) <$> _ppPermissions,
6676+ ("websiteUrl" .=) <$> _ppWebsiteUrl,
6677+ ("type" .=) <$> _ppType,
6678+ ("stripSiteSearchCategoryParameters" .=) <$>
6679+ _ppStripSiteSearchCategoryParameters,
6680+ ("timezone" .=) <$> _ppTimezone,
6681+ ("excludeQueryParameters" .=) <$>
6682+ _ppExcludeQueryParameters,
6683+ ("enhancedECommerceTracking" .=) <$>
6684+ _ppEnhancedECommerceTracking,
6685+ ("stripSiteSearchQueryParameters" .=) <$>
6686+ _ppStripSiteSearchQueryParameters])
6687+
51386688-- | Child link for this view (profile). Points to the list of goals for this
51396689-- view (profile).
51406690--
@@ -5167,6 +6717,21 @@ pclHref = lens _pclHref (\ s a -> s{_pclHref = a})
51676717pclType :: Lens' ProfileChildLink Text
51686718pclType = lens _pclType (\ s a -> s{_pclType = a})
51696719
6720+instance FromJSON ProfileChildLink where
6721+ parseJSON
6722+ = withObject "ProfileChildLink"
6723+ (\ o ->
6724+ ProfileChildLink <$>
6725+ (o .:? "href") <*>
6726+ (o .:? "type" .!= "analytics#goals"))
6727+
6728+instance ToJSON ProfileChildLink where
6729+ toJSON ProfileChildLink{..}
6730+ = object
6731+ (catMaybes
6732+ [("href" .=) <$> _pclHref,
6733+ Just ("type" .= _pclType)])
6734+
51706735-- | JSON template for an Analytics profile filter link.
51716736--
51726737-- /See:/ 'profileFilterLink' smart constructor.
@@ -5243,6 +6808,28 @@ pId = lens _pId (\ s a -> s{_pId = a})
52436808pRank :: Lens' ProfileFilterLink (Maybe Int32)
52446809pRank = lens _pRank (\ s a -> s{_pRank = a})
52456810
6811+instance FromJSON ProfileFilterLink where
6812+ parseJSON
6813+ = withObject "ProfileFilterLink"
6814+ (\ o ->
6815+ ProfileFilterLink <$>
6816+ (o .:? "profileRef") <*>
6817+ (o .:? "kind" .!= "analytics#profileFilterLink")
6818+ <*> (o .:? "filterRef")
6819+ <*> (o .:? "selfLink")
6820+ <*> (o .:? "id")
6821+ <*> (o .:? "rank"))
6822+
6823+instance ToJSON ProfileFilterLink where
6824+ toJSON ProfileFilterLink{..}
6825+ = object
6826+ (catMaybes
6827+ [("profileRef" .=) <$> _pProfileRef,
6828+ Just ("kind" .= _pKind),
6829+ ("filterRef" .=) <$> _pFilterRef,
6830+ ("selfLink" .=) <$> _pSelfLink, ("id" .=) <$> _pId,
6831+ ("rank" .=) <$> _pRank])
6832+
52466833-- | A profile filter link collection lists profile filter links between
52476834-- profiles and filters. Each resource in the collection corresponds to a
52486835-- profile filter link.
@@ -5342,6 +6929,32 @@ pflPreviousLink
53426929 = lens _pflPreviousLink
53436930 (\ s a -> s{_pflPreviousLink = a})
53446931
6932+instance FromJSON ProfileFilterLinks where
6933+ parseJSON
6934+ = withObject "ProfileFilterLinks"
6935+ (\ o ->
6936+ ProfileFilterLinks <$>
6937+ (o .:? "nextLink") <*> (o .:? "itemsPerPage") <*>
6938+ (o .:? "kind" .!= "analytics#profileFilterLinks")
6939+ <*> (o .:? "username")
6940+ <*> (o .:? "items" .!= mempty)
6941+ <*> (o .:? "totalResults")
6942+ <*> (o .:? "startIndex")
6943+ <*> (o .:? "previousLink"))
6944+
6945+instance ToJSON ProfileFilterLinks where
6946+ toJSON ProfileFilterLinks{..}
6947+ = object
6948+ (catMaybes
6949+ [("nextLink" .=) <$> _pflNextLink,
6950+ ("itemsPerPage" .=) <$> _pflItemsPerPage,
6951+ Just ("kind" .= _pflKind),
6952+ ("username" .=) <$> _pflUsername,
6953+ ("items" .=) <$> _pflItems,
6954+ ("totalResults" .=) <$> _pflTotalResults,
6955+ ("startIndex" .=) <$> _pflStartIndex,
6956+ ("previousLink" .=) <$> _pflPreviousLink])
6957+
53456958-- | Parent link for this view (profile). Points to the web property to which
53466959-- this view (profile) belongs.
53476960--
@@ -5374,6 +6987,21 @@ pplHref = lens _pplHref (\ s a -> s{_pplHref = a})
53746987pplType :: Lens' ProfileParentLink Text
53756988pplType = lens _pplType (\ s a -> s{_pplType = a})
53766989
6990+instance FromJSON ProfileParentLink where
6991+ parseJSON
6992+ = withObject "ProfileParentLink"
6993+ (\ o ->
6994+ ProfileParentLink <$>
6995+ (o .:? "href") <*>
6996+ (o .:? "type" .!= "analytics#webproperty"))
6997+
6998+instance ToJSON ProfileParentLink where
6999+ toJSON ProfileParentLink{..}
7000+ = object
7001+ (catMaybes
7002+ [("href" .=) <$> _pplHref,
7003+ Just ("type" .= _pplType)])
7004+
53777005-- | Permissions the user has for this view (profile).
53787006--
53797007-- /See:/ 'profilePermissions' smart constructor.
@@ -5402,6 +7030,18 @@ ppEffective
54027030 _Default
54037031 . _Coerce
54047032
7033+instance FromJSON ProfilePermissions where
7034+ parseJSON
7035+ = withObject "ProfilePermissions"
7036+ (\ o ->
7037+ ProfilePermissions <$>
7038+ (o .:? "effective" .!= mempty))
7039+
7040+instance ToJSON ProfilePermissions where
7041+ toJSON ProfilePermissions{..}
7042+ = object
7043+ (catMaybes [("effective" .=) <$> _ppEffective])
7044+
54057045-- | JSON template for a linked view (profile).
54067046--
54077047-- /See:/ 'profileRef' smart constructor.
@@ -5479,6 +7119,31 @@ prInternalWebPropertyId
54797119prId :: Lens' ProfileRef (Maybe Text)
54807120prId = lens _prId (\ s a -> s{_prId = a})
54817121
7122+instance FromJSON ProfileRef where
7123+ parseJSON
7124+ = withObject "ProfileRef"
7125+ (\ o ->
7126+ ProfileRef <$>
7127+ (o .:? "webPropertyId") <*>
7128+ (o .:? "kind" .!= "analytics#profileRef")
7129+ <*> (o .:? "href")
7130+ <*> (o .:? "accountId")
7131+ <*> (o .:? "name")
7132+ <*> (o .:? "internalWebPropertyId")
7133+ <*> (o .:? "id"))
7134+
7135+instance ToJSON ProfileRef where
7136+ toJSON ProfileRef{..}
7137+ = object
7138+ (catMaybes
7139+ [("webPropertyId" .=) <$> _prWebPropertyId,
7140+ Just ("kind" .= _prKind), ("href" .=) <$> _prHref,
7141+ ("accountId" .=) <$> _prAccountId,
7142+ ("name" .=) <$> _prName,
7143+ ("internalWebPropertyId" .=) <$>
7144+ _prInternalWebPropertyId,
7145+ ("id" .=) <$> _prId])
7146+
54827147-- | JSON template for an Analytics ProfileSummary. ProfileSummary returns
54837148-- basic information (i.e., summary) for a profile.
54847149--
@@ -5527,6 +7192,23 @@ psId = lens _psId (\ s a -> s{_psId = a})
55277192psType :: Lens' ProfileSummary (Maybe Text)
55287193psType = lens _psType (\ s a -> s{_psType = a})
55297194
7195+instance FromJSON ProfileSummary where
7196+ parseJSON
7197+ = withObject "ProfileSummary"
7198+ (\ o ->
7199+ ProfileSummary <$>
7200+ (o .:? "kind" .!= "analytics#profileSummary") <*>
7201+ (o .:? "name")
7202+ <*> (o .:? "id")
7203+ <*> (o .:? "type"))
7204+
7205+instance ToJSON ProfileSummary where
7206+ toJSON ProfileSummary{..}
7207+ = object
7208+ (catMaybes
7209+ [Just ("kind" .= _psKind), ("name" .=) <$> _psName,
7210+ ("id" .=) <$> _psId, ("type" .=) <$> _psType])
7211+
55307212-- | A view (profile) collection lists Analytics views (profiles) to which
55317213-- the user has access. Each resource in the collection corresponds to a
55327214-- single Analytics view (profile).
@@ -5626,6 +7308,32 @@ proPreviousLink
56267308 = lens _proPreviousLink
56277309 (\ s a -> s{_proPreviousLink = a})
56287310
7311+instance FromJSON Profiles where
7312+ parseJSON
7313+ = withObject "Profiles"
7314+ (\ o ->
7315+ Profiles <$>
7316+ (o .:? "nextLink") <*> (o .:? "itemsPerPage") <*>
7317+ (o .:? "kind" .!= "analytics#profiles")
7318+ <*> (o .:? "username")
7319+ <*> (o .:? "items" .!= mempty)
7320+ <*> (o .:? "totalResults")
7321+ <*> (o .:? "startIndex")
7322+ <*> (o .:? "previousLink"))
7323+
7324+instance ToJSON Profiles where
7325+ toJSON Profiles{..}
7326+ = object
7327+ (catMaybes
7328+ [("nextLink" .=) <$> _proNextLink,
7329+ ("itemsPerPage" .=) <$> _proItemsPerPage,
7330+ Just ("kind" .= _proKind),
7331+ ("username" .=) <$> _proUsername,
7332+ ("items" .=) <$> _proItems,
7333+ ("totalResults" .=) <$> _proTotalResults,
7334+ ("startIndex" .=) <$> _proStartIndex,
7335+ ("previousLink" .=) <$> _proPreviousLink])
7336+
56297337-- | Real time data for a given view (profile).
56307338--
56317339-- /See:/ 'realtimeData' smart constructor.
@@ -5733,6 +7441,35 @@ rdTotalsForAllResults
57337441 = lens _rdTotalsForAllResults
57347442 (\ s a -> s{_rdTotalsForAllResults = a})
57357443
7444+instance FromJSON RealtimeData where
7445+ parseJSON
7446+ = withObject "RealtimeData"
7447+ (\ o ->
7448+ RealtimeData <$>
7449+ (o .:? "profileInfo") <*>
7450+ (o .:? "kind" .!= "analytics#realtimeData")
7451+ <*> (o .:? "rows" .!= mempty)
7452+ <*> (o .:? "selfLink")
7453+ <*> (o .:? "query")
7454+ <*> (o .:? "columnHeaders" .!= mempty)
7455+ <*> (o .:? "id")
7456+ <*> (o .:? "totalResults")
7457+ <*> (o .:? "totalsForAllResults"))
7458+
7459+instance ToJSON RealtimeData where
7460+ toJSON RealtimeData{..}
7461+ = object
7462+ (catMaybes
7463+ [("profileInfo" .=) <$> _rdProfileInfo,
7464+ Just ("kind" .= _rdKind), ("rows" .=) <$> _rdRows,
7465+ ("selfLink" .=) <$> _rdSelfLink,
7466+ ("query" .=) <$> _rdQuery,
7467+ ("columnHeaders" .=) <$> _rdColumnHeaders,
7468+ ("id" .=) <$> _rdId,
7469+ ("totalResults" .=) <$> _rdTotalResults,
7470+ ("totalsForAllResults" .=) <$>
7471+ _rdTotalsForAllResults])
7472+
57367473--
57377474-- /See:/ 'realtimeDataItemColumnHeaders' smart constructor.
57387475data RealtimeDataItemColumnHeaders = RealtimeDataItemColumnHeaders
@@ -5778,6 +7515,22 @@ rdichDataType
57787515 = lens _rdichDataType
57797516 (\ s a -> s{_rdichDataType = a})
57807517
7518+instance FromJSON RealtimeDataItemColumnHeaders where
7519+ parseJSON
7520+ = withObject "RealtimeDataItemColumnHeaders"
7521+ (\ o ->
7522+ RealtimeDataItemColumnHeaders <$>
7523+ (o .:? "columnType") <*> (o .:? "name") <*>
7524+ (o .:? "dataType"))
7525+
7526+instance ToJSON RealtimeDataItemColumnHeaders where
7527+ toJSON RealtimeDataItemColumnHeaders{..}
7528+ = object
7529+ (catMaybes
7530+ [("columnType" .=) <$> _rdichColumnType,
7531+ ("name" .=) <$> _rdichName,
7532+ ("dataType" .=) <$> _rdichDataType])
7533+
57817534-- | Information for the view (profile), for which the real time data was
57827535-- requested.
57837536--
@@ -5853,6 +7606,29 @@ rdpiTableId :: Lens' RealtimeDataProfileInfo (Maybe Text)
58537606rdpiTableId
58547607 = lens _rdpiTableId (\ s a -> s{_rdpiTableId = a})
58557608
7609+instance FromJSON RealtimeDataProfileInfo where
7610+ parseJSON
7611+ = withObject "RealtimeDataProfileInfo"
7612+ (\ o ->
7613+ RealtimeDataProfileInfo <$>
7614+ (o .:? "webPropertyId") <*> (o .:? "profileId") <*>
7615+ (o .:? "profileName")
7616+ <*> (o .:? "accountId")
7617+ <*> (o .:? "internalWebPropertyId")
7618+ <*> (o .:? "tableId"))
7619+
7620+instance ToJSON RealtimeDataProfileInfo where
7621+ toJSON RealtimeDataProfileInfo{..}
7622+ = object
7623+ (catMaybes
7624+ [("webPropertyId" .=) <$> _rdpiWebPropertyId,
7625+ ("profileId" .=) <$> _rdpiProfileId,
7626+ ("profileName" .=) <$> _rdpiProfileName,
7627+ ("accountId" .=) <$> _rdpiAccountId,
7628+ ("internalWebPropertyId" .=) <$>
7629+ _rdpiInternalWebPropertyId,
7630+ ("tableId" .=) <$> _rdpiTableId])
7631+
58567632-- | Real time data request query parameters.
58577633--
58587634-- /See:/ 'realtimeDataQuery' smart constructor.
@@ -5926,6 +7702,27 @@ rdqMaxResults
59267702 = lens _rdqMaxResults
59277703 (\ s a -> s{_rdqMaxResults = a})
59287704
7705+instance FromJSON RealtimeDataQuery where
7706+ parseJSON
7707+ = withObject "RealtimeDataQuery"
7708+ (\ o ->
7709+ RealtimeDataQuery <$>
7710+ (o .:? "metrics" .!= mempty) <*> (o .:? "filters")
7711+ <*> (o .:? "ids")
7712+ <*> (o .:? "sort" .!= mempty)
7713+ <*> (o .:? "dimensions")
7714+ <*> (o .:? "max-results"))
7715+
7716+instance ToJSON RealtimeDataQuery where
7717+ toJSON RealtimeDataQuery{..}
7718+ = object
7719+ (catMaybes
7720+ [("metrics" .=) <$> _rdqMetrics,
7721+ ("filters" .=) <$> _rdqFilters,
7722+ ("ids" .=) <$> _rdqIds, ("sort" .=) <$> _rdqSort,
7723+ ("dimensions" .=) <$> _rdqDimensions,
7724+ ("max-results" .=) <$> _rdqMaxResults])
7725+
59297726-- | Total values for the requested metrics over all the results, not just
59307727-- the results returned in this response. The order of the metric totals is
59317728-- same as the metric order specified in the request.
@@ -5941,6 +7738,15 @@ realtimeDataTotalsForAllResults
59417738 :: RealtimeDataTotalsForAllResults
59427739realtimeDataTotalsForAllResults = RealtimeDataTotalsForAllResults
59437740
7741+instance FromJSON RealtimeDataTotalsForAllResults
7742+ where
7743+ parseJSON
7744+ = withObject "RealtimeDataTotalsForAllResults"
7745+ (\ o -> pure RealtimeDataTotalsForAllResults)
7746+
7747+instance ToJSON RealtimeDataTotalsForAllResults where
7748+ toJSON = const (Object mempty)
7749+
59447750-- | JSON template for an Analytics segment.
59457751--
59467752-- /See:/ 'segment' smart constructor.
@@ -6035,6 +7841,34 @@ segSegmentId :: Lens' Segment (Maybe Text)
60357841segSegmentId
60367842 = lens _segSegmentId (\ s a -> s{_segSegmentId = a})
60377843
7844+instance FromJSON Segment where
7845+ parseJSON
7846+ = withObject "Segment"
7847+ (\ o ->
7848+ Segment <$>
7849+ (o .:? "definition") <*>
7850+ (o .:? "kind" .!= "analytics#segment")
7851+ <*> (o .:? "created")
7852+ <*> (o .:? "selfLink")
7853+ <*> (o .:? "name")
7854+ <*> (o .:? "id")
7855+ <*> (o .:? "updated")
7856+ <*> (o .:? "type")
7857+ <*> (o .:? "segmentId"))
7858+
7859+instance ToJSON Segment where
7860+ toJSON Segment{..}
7861+ = object
7862+ (catMaybes
7863+ [("definition" .=) <$> _segDefinition,
7864+ Just ("kind" .= _segKind),
7865+ ("created" .=) <$> _segCreated,
7866+ ("selfLink" .=) <$> _segSelfLink,
7867+ ("name" .=) <$> _segName, ("id" .=) <$> _segId,
7868+ ("updated" .=) <$> _segUpdated,
7869+ ("type" .=) <$> _segType,
7870+ ("segmentId" .=) <$> _segSegmentId])
7871+
60387872-- | An segment collection lists Analytics segments that the user has access
60397873-- to. Each resource in the collection corresponds to a single Analytics
60407874-- segment.
@@ -6132,6 +7966,32 @@ sPreviousLink
61327966 = lens _sPreviousLink
61337967 (\ s a -> s{_sPreviousLink = a})
61347968
7969+instance FromJSON Segments where
7970+ parseJSON
7971+ = withObject "Segments"
7972+ (\ o ->
7973+ Segments <$>
7974+ (o .:? "nextLink") <*> (o .:? "itemsPerPage") <*>
7975+ (o .:? "kind" .!= "analytics#segments")
7976+ <*> (o .:? "username")
7977+ <*> (o .:? "items" .!= mempty)
7978+ <*> (o .:? "totalResults")
7979+ <*> (o .:? "startIndex")
7980+ <*> (o .:? "previousLink"))
7981+
7982+instance ToJSON Segments where
7983+ toJSON Segments{..}
7984+ = object
7985+ (catMaybes
7986+ [("nextLink" .=) <$> _sNextLink,
7987+ ("itemsPerPage" .=) <$> _sItemsPerPage,
7988+ Just ("kind" .= _sKind),
7989+ ("username" .=) <$> _sUsername,
7990+ ("items" .=) <$> _sItems,
7991+ ("totalResults" .=) <$> _sTotalResults,
7992+ ("startIndex" .=) <$> _sStartIndex,
7993+ ("previousLink" .=) <$> _sPreviousLink])
7994+
61357995-- | JSON template for Analytics unsampled report resource.
61367996--
61377997-- /See:/ 'unsampledReport' smart constructor.
@@ -6322,6 +8182,55 @@ unsStartDate :: Lens' UnsampledReport (Maybe Text)
63228182unsStartDate
63238183 = lens _unsStartDate (\ s a -> s{_unsStartDate = a})
63248184
8185+instance FromJSON UnsampledReport where
8186+ parseJSON
8187+ = withObject "UnsampledReport"
8188+ (\ o ->
8189+ UnsampledReport <$>
8190+ (o .:? "downloadType") <*> (o .:? "status") <*>
8191+ (o .:? "metrics")
8192+ <*> (o .:? "driveDownloadDetails")
8193+ <*> (o .:? "webPropertyId")
8194+ <*> (o .:? "kind" .!= "analytics#unsampledReport")
8195+ <*> (o .:? "created")
8196+ <*> (o .:? "filters")
8197+ <*> (o .:? "profileId")
8198+ <*> (o .:? "end-date")
8199+ <*> (o .:? "selfLink")
8200+ <*> (o .:? "accountId")
8201+ <*> (o .:? "id")
8202+ <*> (o .:? "updated")
8203+ <*> (o .:? "title")
8204+ <*> (o .:? "dimensions")
8205+ <*> (o .:? "segment")
8206+ <*> (o .:? "cloudStorageDownloadDetails")
8207+ <*> (o .:? "start-date"))
8208+
8209+instance ToJSON UnsampledReport where
8210+ toJSON UnsampledReport{..}
8211+ = object
8212+ (catMaybes
8213+ [("downloadType" .=) <$> _unsDownloadType,
8214+ ("status" .=) <$> _unsStatus,
8215+ ("metrics" .=) <$> _unsMetrics,
8216+ ("driveDownloadDetails" .=) <$>
8217+ _unsDriveDownloadDetails,
8218+ ("webPropertyId" .=) <$> _unsWebPropertyId,
8219+ Just ("kind" .= _unsKind),
8220+ ("created" .=) <$> _unsCreated,
8221+ ("filters" .=) <$> _unsFilters,
8222+ ("profileId" .=) <$> _unsProfileId,
8223+ ("end-date" .=) <$> _unsEndDate,
8224+ ("selfLink" .=) <$> _unsSelfLink,
8225+ ("accountId" .=) <$> _unsAccountId,
8226+ ("id" .=) <$> _unsId, ("updated" .=) <$> _unsUpdated,
8227+ ("title" .=) <$> _unsTitle,
8228+ ("dimensions" .=) <$> _unsDimensions,
8229+ ("segment" .=) <$> _unsSegment,
8230+ ("cloudStorageDownloadDetails" .=) <$>
8231+ _unsCloudStorageDownloadDetails,
8232+ ("start-date" .=) <$> _unsStartDate])
8233+
63258234-- | Download details for a file stored in Google Cloud Storage.
63268235--
63278236-- /See:/ 'unsampledReportCloudStorageDownloadDetails' smart constructor.
@@ -6357,6 +8266,23 @@ urcsddBucketId
63578266 = lens _urcsddBucketId
63588267 (\ s a -> s{_urcsddBucketId = a})
63598268
8269+instance FromJSON
8270+ UnsampledReportCloudStorageDownloadDetails where
8271+ parseJSON
8272+ = withObject
8273+ "UnsampledReportCloudStorageDownloadDetails"
8274+ (\ o ->
8275+ UnsampledReportCloudStorageDownloadDetails <$>
8276+ (o .:? "objectId") <*> (o .:? "bucketId"))
8277+
8278+instance ToJSON
8279+ UnsampledReportCloudStorageDownloadDetails where
8280+ toJSON UnsampledReportCloudStorageDownloadDetails{..}
8281+ = object
8282+ (catMaybes
8283+ [("objectId" .=) <$> _urcsddObjectId,
8284+ ("bucketId" .=) <$> _urcsddBucketId])
8285+
63608286-- | Download details for a file stored in Google Drive.
63618287--
63628288-- /See:/ 'unsampledReportDriveDownloadDetails' smart constructor.
@@ -6382,6 +8308,20 @@ urdddDocumentId
63828308 = lens _urdddDocumentId
63838309 (\ s a -> s{_urdddDocumentId = a})
63848310
8311+instance FromJSON UnsampledReportDriveDownloadDetails
8312+ where
8313+ parseJSON
8314+ = withObject "UnsampledReportDriveDownloadDetails"
8315+ (\ o ->
8316+ UnsampledReportDriveDownloadDetails <$>
8317+ (o .:? "documentId"))
8318+
8319+instance ToJSON UnsampledReportDriveDownloadDetails
8320+ where
8321+ toJSON UnsampledReportDriveDownloadDetails{..}
8322+ = object
8323+ (catMaybes [("documentId" .=) <$> _urdddDocumentId])
8324+
63858325-- | An unsampled report collection lists Analytics unsampled reports to
63868326-- which the user has access. Each view (profile) can have a set of
63878327-- unsampled reports. Each resource in the unsampled report collection
@@ -6480,6 +8420,32 @@ urPreviousLink
64808420 = lens _urPreviousLink
64818421 (\ s a -> s{_urPreviousLink = a})
64828422
8423+instance FromJSON UnsampledReports where
8424+ parseJSON
8425+ = withObject "UnsampledReports"
8426+ (\ o ->
8427+ UnsampledReports <$>
8428+ (o .:? "nextLink") <*> (o .:? "itemsPerPage") <*>
8429+ (o .:? "kind" .!= "analytics#unsampledReports")
8430+ <*> (o .:? "username")
8431+ <*> (o .:? "items" .!= mempty)
8432+ <*> (o .:? "totalResults")
8433+ <*> (o .:? "startIndex")
8434+ <*> (o .:? "previousLink"))
8435+
8436+instance ToJSON UnsampledReports where
8437+ toJSON UnsampledReports{..}
8438+ = object
8439+ (catMaybes
8440+ [("nextLink" .=) <$> _urNextLink,
8441+ ("itemsPerPage" .=) <$> _urItemsPerPage,
8442+ Just ("kind" .= _urKind),
8443+ ("username" .=) <$> _urUsername,
8444+ ("items" .=) <$> _urItems,
8445+ ("totalResults" .=) <$> _urTotalResults,
8446+ ("startIndex" .=) <$> _urStartIndex,
8447+ ("previousLink" .=) <$> _urPreviousLink])
8448+
64838449-- | Metadata returned for an upload operation.
64848450--
64858451-- /See:/ 'upload' smart constructor.
@@ -6551,6 +8517,28 @@ uplErrors
65518517 _Default
65528518 . _Coerce
65538519
8520+instance FromJSON Upload where
8521+ parseJSON
8522+ = withObject "Upload"
8523+ (\ o ->
8524+ Upload <$>
8525+ (o .:? "status") <*>
8526+ (o .:? "kind" .!= "analytics#upload")
8527+ <*> (o .:? "customDataSourceId")
8528+ <*> (o .:? "accountId")
8529+ <*> (o .:? "id")
8530+ <*> (o .:? "errors" .!= mempty))
8531+
8532+instance ToJSON Upload where
8533+ toJSON Upload{..}
8534+ = object
8535+ (catMaybes
8536+ [("status" .=) <$> _uplStatus,
8537+ Just ("kind" .= _uplKind),
8538+ ("customDataSourceId" .=) <$> _uplCustomDataSourceId,
8539+ ("accountId" .=) <$> _uplAccountId,
8540+ ("id" .=) <$> _uplId, ("errors" .=) <$> _uplErrors])
8541+
65548542-- | Upload collection lists Analytics uploads to which the user has access.
65558543-- Each custom data source can have a set of uploads. Each resource in the
65568544-- upload collection corresponds to a single Analytics data upload.
@@ -6639,6 +8627,29 @@ uPreviousLink
66398627 = lens _uPreviousLink
66408628 (\ s a -> s{_uPreviousLink = a})
66418629
8630+instance FromJSON Uploads where
8631+ parseJSON
8632+ = withObject "Uploads"
8633+ (\ o ->
8634+ Uploads <$>
8635+ (o .:? "nextLink") <*> (o .:? "itemsPerPage") <*>
8636+ (o .:? "kind" .!= "analytics#uploads")
8637+ <*> (o .:? "items" .!= mempty)
8638+ <*> (o .:? "totalResults")
8639+ <*> (o .:? "startIndex")
8640+ <*> (o .:? "previousLink"))
8641+
8642+instance ToJSON Uploads where
8643+ toJSON Uploads{..}
8644+ = object
8645+ (catMaybes
8646+ [("nextLink" .=) <$> _uNextLink,
8647+ ("itemsPerPage" .=) <$> _uItemsPerPage,
8648+ Just ("kind" .= _uKind), ("items" .=) <$> _uItems,
8649+ ("totalResults" .=) <$> _uTotalResults,
8650+ ("startIndex" .=) <$> _uStartIndex,
8651+ ("previousLink" .=) <$> _uPreviousLink])
8652+
66428653-- | JSON template for a user reference.
66438654--
66448655-- /See:/ 'userRef' smart constructor.
@@ -6677,6 +8688,22 @@ useKind = lens _useKind (\ s a -> s{_useKind = a})
66778688useId :: Lens' UserRef (Maybe Text)
66788689useId = lens _useId (\ s a -> s{_useId = a})
66798690
8691+instance FromJSON UserRef where
8692+ parseJSON
8693+ = withObject "UserRef"
8694+ (\ o ->
8695+ UserRef <$>
8696+ (o .:? "email") <*>
8697+ (o .:? "kind" .!= "analytics#userRef")
8698+ <*> (o .:? "id"))
8699+
8700+instance ToJSON UserRef where
8701+ toJSON UserRef{..}
8702+ = object
8703+ (catMaybes
8704+ [("email" .=) <$> _useEmail,
8705+ Just ("kind" .= _useKind), ("id" .=) <$> _useId])
8706+
66808707-- | JSON template for a web property reference.
66818708--
66828709-- /See:/ 'webPropertyRef' smart constructor.
@@ -6743,6 +8770,29 @@ wprInternalWebPropertyId
67438770wprId :: Lens' WebPropertyRef (Maybe Text)
67448771wprId = lens _wprId (\ s a -> s{_wprId = a})
67458772
8773+instance FromJSON WebPropertyRef where
8774+ parseJSON
8775+ = withObject "WebPropertyRef"
8776+ (\ o ->
8777+ WebPropertyRef <$>
8778+ (o .:? "kind" .!= "analytics#webPropertyRef") <*>
8779+ (o .:? "href")
8780+ <*> (o .:? "accountId")
8781+ <*> (o .:? "name")
8782+ <*> (o .:? "internalWebPropertyId")
8783+ <*> (o .:? "id"))
8784+
8785+instance ToJSON WebPropertyRef where
8786+ toJSON WebPropertyRef{..}
8787+ = object
8788+ (catMaybes
8789+ [Just ("kind" .= _wprKind), ("href" .=) <$> _wprHref,
8790+ ("accountId" .=) <$> _wprAccountId,
8791+ ("name" .=) <$> _wprName,
8792+ ("internalWebPropertyId" .=) <$>
8793+ _wprInternalWebPropertyId,
8794+ ("id" .=) <$> _wprId])
8795+
67468796-- | JSON template for an Analytics WebPropertySummary. WebPropertySummary
67478797-- returns basic information (i.e., summary) for a web property.
67488798--
@@ -6822,6 +8872,32 @@ wpsWebsiteUrl
68228872wpsLevel :: Lens' WebPropertySummary (Maybe Text)
68238873wpsLevel = lens _wpsLevel (\ s a -> s{_wpsLevel = a})
68248874
8875+instance FromJSON WebPropertySummary where
8876+ parseJSON
8877+ = withObject "WebPropertySummary"
8878+ (\ o ->
8879+ WebPropertySummary <$>
8880+ (o .:? "kind" .!= "analytics#webPropertySummary") <*>
8881+ (o .:? "profiles" .!= mempty)
8882+ <*> (o .:? "name")
8883+ <*> (o .:? "internalWebPropertyId")
8884+ <*> (o .:? "id")
8885+ <*> (o .:? "websiteUrl")
8886+ <*> (o .:? "level"))
8887+
8888+instance ToJSON WebPropertySummary where
8889+ toJSON WebPropertySummary{..}
8890+ = object
8891+ (catMaybes
8892+ [Just ("kind" .= _wpsKind),
8893+ ("profiles" .=) <$> _wpsProfiles,
8894+ ("name" .=) <$> _wpsName,
8895+ ("internalWebPropertyId" .=) <$>
8896+ _wpsInternalWebPropertyId,
8897+ ("id" .=) <$> _wpsId,
8898+ ("websiteUrl" .=) <$> _wpsWebsiteUrl,
8899+ ("level" .=) <$> _wpsLevel])
8900+
68258901-- | A web property collection lists Analytics web properties to which the
68268902-- user has access. Each resource in the collection corresponds to a single
68278903-- Analytics web property.
@@ -6921,6 +8997,32 @@ webPreviousLink
69218997 = lens _webPreviousLink
69228998 (\ s a -> s{_webPreviousLink = a})
69238999
9000+instance FromJSON Webproperties where
9001+ parseJSON
9002+ = withObject "Webproperties"
9003+ (\ o ->
9004+ Webproperties <$>
9005+ (o .:? "nextLink") <*> (o .:? "itemsPerPage") <*>
9006+ (o .:? "kind" .!= "analytics#webproperties")
9007+ <*> (o .:? "username")
9008+ <*> (o .:? "items" .!= mempty)
9009+ <*> (o .:? "totalResults")
9010+ <*> (o .:? "startIndex")
9011+ <*> (o .:? "previousLink"))
9012+
9013+instance ToJSON Webproperties where
9014+ toJSON Webproperties{..}
9015+ = object
9016+ (catMaybes
9017+ [("nextLink" .=) <$> _webNextLink,
9018+ ("itemsPerPage" .=) <$> _webItemsPerPage,
9019+ Just ("kind" .= _webKind),
9020+ ("username" .=) <$> _webUsername,
9021+ ("items" .=) <$> _webItems,
9022+ ("totalResults" .=) <$> _webTotalResults,
9023+ ("startIndex" .=) <$> _webStartIndex,
9024+ ("previousLink" .=) <$> _webPreviousLink])
9025+
69249026-- | JSON template for an Analytics web property.
69259027--
69269028-- /See:/ 'webproperty' smart constructor.
@@ -7080,6 +9182,48 @@ wIndustryVertical
70809182wLevel :: Lens' Webproperty (Maybe Text)
70819183wLevel = lens _wLevel (\ s a -> s{_wLevel = a})
70829184
9185+instance FromJSON Webproperty where
9186+ parseJSON
9187+ = withObject "Webproperty"
9188+ (\ o ->
9189+ Webproperty <$>
9190+ (o .:? "parentLink") <*> (o .:? "childLink") <*>
9191+ (o .:? "defaultProfileId")
9192+ <*> (o .:? "kind" .!= "analytics#webproperty")
9193+ <*> (o .:? "created")
9194+ <*> (o .:? "selfLink")
9195+ <*> (o .:? "accountId")
9196+ <*> (o .:? "name")
9197+ <*> (o .:? "internalWebPropertyId")
9198+ <*> (o .:? "id")
9199+ <*> (o .:? "updated")
9200+ <*> (o .:? "profileCount")
9201+ <*> (o .:? "permissions")
9202+ <*> (o .:? "websiteUrl")
9203+ <*> (o .:? "industryVertical")
9204+ <*> (o .:? "level"))
9205+
9206+instance ToJSON Webproperty where
9207+ toJSON Webproperty{..}
9208+ = object
9209+ (catMaybes
9210+ [("parentLink" .=) <$> _wParentLink,
9211+ ("childLink" .=) <$> _wChildLink,
9212+ ("defaultProfileId" .=) <$> _wDefaultProfileId,
9213+ Just ("kind" .= _wKind),
9214+ ("created" .=) <$> _wCreated,
9215+ ("selfLink" .=) <$> _wSelfLink,
9216+ ("accountId" .=) <$> _wAccountId,
9217+ ("name" .=) <$> _wName,
9218+ ("internalWebPropertyId" .=) <$>
9219+ _wInternalWebPropertyId,
9220+ ("id" .=) <$> _wId, ("updated" .=) <$> _wUpdated,
9221+ ("profileCount" .=) <$> _wProfileCount,
9222+ ("permissions" .=) <$> _wPermissions,
9223+ ("websiteUrl" .=) <$> _wWebsiteUrl,
9224+ ("industryVertical" .=) <$> _wIndustryVertical,
9225+ ("level" .=) <$> _wLevel])
9226+
70839227-- | Child link for this web property. Points to the list of views (profiles)
70849228-- for this web property.
70859229--
@@ -7112,6 +9256,21 @@ wclHref = lens _wclHref (\ s a -> s{_wclHref = a})
71129256wclType :: Lens' WebpropertyChildLink Text
71139257wclType = lens _wclType (\ s a -> s{_wclType = a})
71149258
9259+instance FromJSON WebpropertyChildLink where
9260+ parseJSON
9261+ = withObject "WebpropertyChildLink"
9262+ (\ o ->
9263+ WebpropertyChildLink <$>
9264+ (o .:? "href") <*>
9265+ (o .:? "type" .!= "analytics#profiles"))
9266+
9267+instance ToJSON WebpropertyChildLink where
9268+ toJSON WebpropertyChildLink{..}
9269+ = object
9270+ (catMaybes
9271+ [("href" .=) <$> _wclHref,
9272+ Just ("type" .= _wclType)])
9273+
71159274-- | Parent link for this web property. Points to the account to which this
71169275-- web property belongs.
71179276--
@@ -7144,6 +9303,21 @@ wplHref = lens _wplHref (\ s a -> s{_wplHref = a})
71449303wplType :: Lens' WebpropertyParentLink Text
71459304wplType = lens _wplType (\ s a -> s{_wplType = a})
71469305
9306+instance FromJSON WebpropertyParentLink where
9307+ parseJSON
9308+ = withObject "WebpropertyParentLink"
9309+ (\ o ->
9310+ WebpropertyParentLink <$>
9311+ (o .:? "href") <*>
9312+ (o .:? "type" .!= "analytics#account"))
9313+
9314+instance ToJSON WebpropertyParentLink where
9315+ toJSON WebpropertyParentLink{..}
9316+ = object
9317+ (catMaybes
9318+ [("href" .=) <$> _wplHref,
9319+ Just ("type" .= _wplType)])
9320+
71479321-- | Permissions the user has for this web property.
71489322--
71499323-- /See:/ 'webpropertyPermissions' smart constructor.
@@ -7171,3 +9345,15 @@ wpEffective
71719345 = lens _wpEffective (\ s a -> s{_wpEffective = a}) .
71729346 _Default
71739347 . _Coerce
9348+
9349+instance FromJSON WebpropertyPermissions where
9350+ parseJSON
9351+ = withObject "WebpropertyPermissions"
9352+ (\ o ->
9353+ WebpropertyPermissions <$>
9354+ (o .:? "effective" .!= mempty))
9355+
9356+instance ToJSON WebpropertyPermissions where
9357+ toJSON WebpropertyPermissions{..}
9358+ = object
9359+ (catMaybes [("effective" .=) <$> _wpEffective])
gogol-appengine-taskqueue/gen/Network/Google/AppEngine/TaskQueue.hs+124−107
@@ -99,134 +99,151 @@ type TasksAPI =
9999
100100-- | Insert a new task in a TaskQueue
101101type TasksInsert =
102− "taskqueue" :> "v1beta2" :> "projects" :>
103− Capture "project" Text
104− :> "taskqueues"
105− :> Capture "taskqueue" Text
106− :> "tasks"
107− :> QueryParam "quotaUser" Text
108− :> QueryParam "prettyPrint" Bool
109− :> QueryParam "userIp" Text
110− :> QueryParam "key" Text
111− :> QueryParam "oauth_token" Text
112− :> QueryParam "fields" Text
113− :> QueryParam "alt" Text
102+ "taskqueue" :>
103+ "v1beta2" :>
104+ "projects" :>
105+ Capture "project" Text :>
106+ "taskqueues" :>
107+ Capture "taskqueue" Text :>
108+ "tasks" :>
109+ QueryParam "quotaUser" Text :>
110+ QueryParam "prettyPrint" Bool :>
111+ QueryParam "userIp" Text :>
112+ QueryParam "key" Text :>
113+ QueryParam "oauth_token" Text :>
114+ QueryParam "fields" Text :>
115+ QueryParam "alt" Text :> Post '[JSON] Task
114116
115117-- | List Tasks in a TaskQueue
116118type TasksList =
117− "taskqueue" :> "v1beta2" :> "projects" :>
118− Capture "project" Text
119− :> "taskqueues"
120− :> Capture "taskqueue" Text
121− :> "tasks"
122− :> QueryParam "quotaUser" Text
123− :> QueryParam "prettyPrint" Bool
124− :> QueryParam "userIp" Text
125− :> QueryParam "key" Text
126− :> QueryParam "oauth_token" Text
127− :> QueryParam "fields" Text
128− :> QueryParam "alt" Text
119+ "taskqueue" :>
120+ "v1beta2" :>
121+ "projects" :>
122+ Capture "project" Text :>
123+ "taskqueues" :>
124+ Capture "taskqueue" Text :>
125+ "tasks" :>
126+ QueryParam "quotaUser" Text :>
127+ QueryParam "prettyPrint" Bool :>
128+ QueryParam "userIp" Text :>
129+ QueryParam "key" Text :>
130+ QueryParam "oauth_token" Text :>
131+ QueryParam "fields" Text :>
132+ QueryParam "alt" Text :> Get '[JSON] Tasks2
129133
130134-- | Update tasks that are leased out of a TaskQueue. This method supports
131135-- patch semantics.
132136type TasksPatch =
133− "taskqueue" :> "v1beta2" :> "projects" :>
134− Capture "project" Text
135− :> "taskqueues"
136− :> Capture "taskqueue" Text
137− :> "tasks"
138− :> Capture "task" Text
139− :> QueryParam "quotaUser" Text
140− :> QueryParam "prettyPrint" Bool
141− :> QueryParam "userIp" Text
142− :> QueryParam "key" Text
143− :> QueryParam "oauth_token" Text
144− :> QueryParam "newLeaseSeconds" Int32
145− :> QueryParam "fields" Text
146− :> QueryParam "alt" Text
137+ "taskqueue" :>
138+ "v1beta2" :>
139+ "projects" :>
140+ Capture "project" Text :>
141+ "taskqueues" :>
142+ Capture "taskqueue" Text :>
143+ "tasks" :>
144+ Capture "task" Text :>
145+ QueryParam "quotaUser" Text :>
146+ QueryParam "prettyPrint" Bool :>
147+ QueryParam "userIp" Text :>
148+ QueryParam "key" Text :>
149+ QueryParam "oauth_token" Text :>
150+ QueryParam "newLeaseSeconds" Int32 :>
151+ QueryParam "fields" Text :>
152+ QueryParam "alt" Text :> Patch '[JSON] Task
147153
148154-- | Get a particular task from a TaskQueue.
149155type TasksGet =
150− "taskqueue" :> "v1beta2" :> "projects" :>
151− Capture "project" Text
152− :> "taskqueues"
153− :> Capture "taskqueue" Text
154− :> "tasks"
155− :> Capture "task" Text
156− :> QueryParam "quotaUser" Text
157− :> QueryParam "prettyPrint" Bool
158− :> QueryParam "userIp" Text
159− :> QueryParam "key" Text
160− :> QueryParam "oauth_token" Text
161− :> QueryParam "fields" Text
162− :> QueryParam "alt" Text
156+ "taskqueue" :>
157+ "v1beta2" :>
158+ "projects" :>
159+ Capture "project" Text :>
160+ "taskqueues" :>
161+ Capture "taskqueue" Text :>
162+ "tasks" :>
163+ Capture "task" Text :>
164+ QueryParam "quotaUser" Text :>
165+ QueryParam "prettyPrint" Bool :>
166+ QueryParam "userIp" Text :>
167+ QueryParam "key" Text :>
168+ QueryParam "oauth_token" Text :>
169+ QueryParam "fields" Text :>
170+ QueryParam "alt" Text :> Get '[JSON] Task
163171
164172-- | Lease 1 or more tasks from a TaskQueue.
165173type TasksLease =
166− "taskqueue" :> "v1beta2" :> "projects" :>
167− Capture "project" Text
168− :> "taskqueues"
169− :> Capture "taskqueue" Text
170− :> "tasks"
171− :> "lease"
172− :> QueryParam "quotaUser" Text
173− :> QueryParam "prettyPrint" Bool
174− :> QueryParam "tag" Text
175− :> QueryParam "userIp" Text
176− :> QueryParam "numTasks" Int32
177− :> QueryParam "key" Text
178− :> QueryParam "leaseSecs" Int32
179− :> QueryParam "oauth_token" Text
180− :> QueryParam "groupByTag" Bool
181− :> QueryParam "fields" Text
182− :> QueryParam "alt" Text
174+ "taskqueue" :>
175+ "v1beta2" :>
176+ "projects" :>
177+ Capture "project" Text :>
178+ "taskqueues" :>
179+ Capture "taskqueue" Text :>
180+ "tasks" :>
181+ "lease" :>
182+ QueryParam "quotaUser" Text :>
183+ QueryParam "prettyPrint" Bool :>
184+ QueryParam "tag" Text :>
185+ QueryParam "userIp" Text :>
186+ QueryParam "numTasks" Int32 :>
187+ QueryParam "key" Text :>
188+ QueryParam "leaseSecs" Int32 :>
189+ QueryParam "oauth_token" Text :>
190+ QueryParam "groupByTag" Bool :>
191+ QueryParam "fields" Text :>
192+ QueryParam "alt" Text :>
193+ Post '[JSON] Tasks
183194
184195-- | Delete a task from a TaskQueue.
185196type TasksDelete =
186− "taskqueue" :> "v1beta2" :> "projects" :>
187− Capture "project" Text
188− :> "taskqueues"
189− :> Capture "taskqueue" Text
190− :> "tasks"
191− :> Capture "task" Text
192− :> QueryParam "quotaUser" Text
193− :> QueryParam "prettyPrint" Bool
194− :> QueryParam "userIp" Text
195− :> QueryParam "key" Text
196− :> QueryParam "oauth_token" Text
197− :> QueryParam "fields" Text
198− :> QueryParam "alt" Text
197+ "taskqueue" :>
198+ "v1beta2" :>
199+ "projects" :>
200+ Capture "project" Text :>
201+ "taskqueues" :>
202+ Capture "taskqueue" Text :>
203+ "tasks" :>
204+ Capture "task" Text :>
205+ QueryParam "quotaUser" Text :>
206+ QueryParam "prettyPrint" Bool :>
207+ QueryParam "userIp" Text :>
208+ QueryParam "key" Text :>
209+ QueryParam "oauth_token" Text :>
210+ QueryParam "fields" Text :>
211+ QueryParam "alt" Text :> Delete '[JSON] ()
199212
200213-- | Update tasks that are leased out of a TaskQueue.
201214type TasksUpdate =
202− "taskqueue" :> "v1beta2" :> "projects" :>
203− Capture "project" Text
204− :> "taskqueues"
205− :> Capture "taskqueue" Text
206− :> "tasks"
207− :> Capture "task" Text
208− :> QueryParam "quotaUser" Text
209− :> QueryParam "prettyPrint" Bool
210− :> QueryParam "userIp" Text
211− :> QueryParam "key" Text
212− :> QueryParam "oauth_token" Text
213− :> QueryParam "newLeaseSeconds" Int32
214− :> QueryParam "fields" Text
215− :> QueryParam "alt" Text
215+ "taskqueue" :>
216+ "v1beta2" :>
217+ "projects" :>
218+ Capture "project" Text :>
219+ "taskqueues" :>
220+ Capture "taskqueue" Text :>
221+ "tasks" :>
222+ Capture "task" Text :>
223+ QueryParam "quotaUser" Text :>
224+ QueryParam "prettyPrint" Bool :>
225+ QueryParam "userIp" Text :>
226+ QueryParam "key" Text :>
227+ QueryParam "oauth_token" Text :>
228+ QueryParam "newLeaseSeconds" Int32 :>
229+ QueryParam "fields" Text :>
230+ QueryParam "alt" Text :> Post '[JSON] Task
216231
217232type TaskqueuesAPI = TaskqueuesGet
218233
219234-- | Get detailed information about a TaskQueue.
220235type TaskqueuesGet =
221− "taskqueue" :> "v1beta2" :> "projects" :>
222− Capture "project" Text
223− :> "taskqueues"
224− :> Capture "taskqueue" Text
225− :> QueryParam "quotaUser" Text
226− :> QueryParam "prettyPrint" Bool
227− :> QueryParam "userIp" Text
228− :> QueryParam "key" Text
229− :> QueryParam "getStats" Bool
230− :> QueryParam "oauth_token" Text
231− :> QueryParam "fields" Text
232− :> QueryParam "alt" Text
236+ "taskqueue" :>
237+ "v1beta2" :>
238+ "projects" :>
239+ Capture "project" Text :>
240+ "taskqueues" :>
241+ Capture "taskqueue" Text :>
242+ QueryParam "quotaUser" Text :>
243+ QueryParam "prettyPrint" Bool :>
244+ QueryParam "userIp" Text :>
245+ QueryParam "key" Text :>
246+ QueryParam "getStats" Bool :>
247+ QueryParam "oauth_token" Text :>
248+ QueryParam "fields" Text :>
249+ QueryParam "alt" Text :> Get '[JSON] TaskQueue
gogol-appengine-taskqueue/gen/Network/Google/AppEngine/TaskQueue/Types/Product.hs+110
@@ -1,6 +1,7 @@
11{-# LANGUAGE DeriveDataTypeable #-}
22{-# LANGUAGE DeriveGeneric #-}
33{-# LANGUAGE OverloadedStrings #-}
4+{-# LANGUAGE RecordWildCards #-}
45
56{-# OPTIONS_GHC -fno-warn-unused-imports #-}
67
@@ -106,6 +107,31 @@ tLeaseTimestamp
106107 = lens _tLeaseTimestamp
107108 (\ s a -> s{_tLeaseTimestamp = a})
108109
110+instance FromJSON Task where
111+ parseJSON
112+ = withObject "Task"
113+ (\ o ->
114+ Task <$>
115+ (o .:? "retry_count") <*> (o .:? "enqueueTimestamp")
116+ <*> (o .:? "tag")
117+ <*> (o .:? "kind" .!= "taskqueues#task")
118+ <*> (o .:? "queueName")
119+ <*> (o .:? "payloadBase64")
120+ <*> (o .:? "id")
121+ <*> (o .:? "leaseTimestamp"))
122+
123+instance ToJSON Task where
124+ toJSON Task{..}
125+ = object
126+ (catMaybes
127+ [("retry_count" .=) <$> _tRetryCount,
128+ ("enqueueTimestamp" .=) <$> _tEnqueueTimestamp,
129+ ("tag" .=) <$> _tTag, Just ("kind" .= _tKind),
130+ ("queueName" .=) <$> _tQueueName,
131+ ("payloadBase64" .=) <$> _tPayloadBase64,
132+ ("id" .=) <$> _tId,
133+ ("leaseTimestamp" .=) <$> _tLeaseTimestamp])
134+
109135--
110136-- /See:/ 'taskQueue' smart constructor.
111137data TaskQueue = TaskQueue
@@ -162,6 +188,25 @@ tqId = lens _tqId (\ s a -> s{_tqId = a})
162188tqAcl :: Lens' TaskQueue (Maybe TaskQueueAcl)
163189tqAcl = lens _tqAcl (\ s a -> s{_tqAcl = a})
164190
191+instance FromJSON TaskQueue where
192+ parseJSON
193+ = withObject "TaskQueue"
194+ (\ o ->
195+ TaskQueue <$>
196+ (o .:? "kind" .!= "taskqueues#taskqueue") <*>
197+ (o .:? "stats")
198+ <*> (o .:? "maxLeases")
199+ <*> (o .:? "id")
200+ <*> (o .:? "acl"))
201+
202+instance ToJSON TaskQueue where
203+ toJSON TaskQueue{..}
204+ = object
205+ (catMaybes
206+ [Just ("kind" .= _tqKind), ("stats" .=) <$> _tqStats,
207+ ("maxLeases" .=) <$> _tqMaxLeases,
208+ ("id" .=) <$> _tqId, ("acl" .=) <$> _tqAcl])
209+
165210-- | ACLs that are applicable to this TaskQueue object.
166211--
167212-- /See:/ 'taskQueueAcl' smart constructor.
@@ -216,6 +261,23 @@ tqaConsumerEmails
216261 . _Default
217262 . _Coerce
218263
264+instance FromJSON TaskQueueAcl where
265+ parseJSON
266+ = withObject "TaskQueueAcl"
267+ (\ o ->
268+ TaskQueueAcl <$>
269+ (o .:? "producerEmails" .!= mempty) <*>
270+ (o .:? "adminEmails" .!= mempty)
271+ <*> (o .:? "consumerEmails" .!= mempty))
272+
273+instance ToJSON TaskQueueAcl where
274+ toJSON TaskQueueAcl{..}
275+ = object
276+ (catMaybes
277+ [("producerEmails" .=) <$> _tqaProducerEmails,
278+ ("adminEmails" .=) <$> _tqaAdminEmails,
279+ ("consumerEmails" .=) <$> _tqaConsumerEmails])
280+
219281-- | Statistics for the TaskQueue object in question.
220282--
221283-- /See:/ 'taskQueueStats' smart constructor.
@@ -272,6 +334,24 @@ tqsLeasedLastMinute
272334 = lens _tqsLeasedLastMinute
273335 (\ s a -> s{_tqsLeasedLastMinute = a})
274336
337+instance FromJSON TaskQueueStats where
338+ parseJSON
339+ = withObject "TaskQueueStats"
340+ (\ o ->
341+ TaskQueueStats <$>
342+ (o .:? "totalTasks") <*> (o .:? "oldestTask") <*>
343+ (o .:? "leasedLastHour")
344+ <*> (o .:? "leasedLastMinute"))
345+
346+instance ToJSON TaskQueueStats where
347+ toJSON TaskQueueStats{..}
348+ = object
349+ (catMaybes
350+ [("totalTasks" .=) <$> _tqsTotalTasks,
351+ ("oldestTask" .=) <$> _tqsOldestTask,
352+ ("leasedLastHour" .=) <$> _tqsLeasedLastHour,
353+ ("leasedLastMinute" .=) <$> _tqsLeasedLastMinute])
354+
275355--
276356-- /See:/ 'tasks' smart constructor.
277357data Tasks = Tasks
@@ -305,6 +385,21 @@ tasItems
305385 _Default
306386 . _Coerce
307387
388+instance FromJSON Tasks where
389+ parseJSON
390+ = withObject "Tasks"
391+ (\ o ->
392+ Tasks <$>
393+ (o .:? "kind" .!= "taskqueue#tasks") <*>
394+ (o .:? "items" .!= mempty))
395+
396+instance ToJSON Tasks where
397+ toJSON Tasks{..}
398+ = object
399+ (catMaybes
400+ [Just ("kind" .= _tasKind),
401+ ("items" .=) <$> _tasItems])
402+
308403--
309404-- /See:/ 'tasks2' smart constructor.
310405data Tasks2 = Tasks2
@@ -336,3 +431,18 @@ ttItems :: Lens' Tasks2 [Maybe Task]
336431ttItems
337432 = lens _ttItems (\ s a -> s{_ttItems = a}) . _Default
338433 . _Coerce
434+
435+instance FromJSON Tasks2 where
436+ parseJSON
437+ = withObject "Tasks2"
438+ (\ o ->
439+ Tasks2 <$>
440+ (o .:? "kind" .!= "taskqueues#tasks") <*>
441+ (o .:? "items" .!= mempty))
442+
443+instance ToJSON Tasks2 where
444+ toJSON Tasks2{..}
445+ = object
446+ (catMaybes
447+ [Just ("kind" .= _ttKind),
448+ ("items" .=) <$> _ttItems])
gogol-appengine/gen/Network/Google/AppEngine.hs+127−108
@@ -328,89 +328,102 @@ type VersionsAPI =
328328
329329-- | Lists the versions of a module.
330330type VersionsList =
331− "v1beta4" :> "apps" :> Capture "appsId" Text :>
332− "modules"
333− :> Capture "modulesId" Text
334− :> "versions"
335− :> QueryParam "$.xgafv" Text
336− :> QueryParam "quotaUser" Text
337− :> QueryParam "prettyPrint" Bool
338− :> QueryParam "upload_protocol" Text
339− :> QueryParam "pp" Bool
340− :> QueryParam "access_token" Text
341− :> QueryParam "uploadType" Text
342− :> QueryParam "bearer_token" Text
343− :> QueryParam "key" Text
344− :> QueryParam "view" Text
345− :> QueryParam "pageToken" Text
346− :> QueryParam "oauth_token" Text
347− :> QueryParam "pageSize" Int32
348− :> QueryParam "fields" Text
349− :> QueryParam "callback" Text
350− :> QueryParam "alt" Text
331+ "v1beta4" :>
332+ "apps" :>
333+ Capture "appsId" Text :>
334+ "modules" :>
335+ Capture "modulesId" Text :>
336+ "versions" :>
337+ QueryParam "$.xgafv" Text :>
338+ QueryParam "quotaUser" Text :>
339+ QueryParam "prettyPrint" Bool :>
340+ QueryParam "upload_protocol" Text :>
341+ QueryParam "pp" Bool :>
342+ QueryParam "access_token" Text :>
343+ QueryParam "uploadType" Text :>
344+ QueryParam "bearer_token" Text :>
345+ QueryParam "key" Text :>
346+ QueryParam "view" Text :>
347+ QueryParam "pageToken" Text :>
348+ QueryParam "oauth_token" Text :>
349+ QueryParam "pageSize" Int32 :>
350+ QueryParam "fields" Text :>
351+ QueryParam "callback" Text :>
352+ QueryParam "alt" Text :>
353+ Get '[JSON]
354+ ListVersionsResponse
351355
352356-- | Gets application deployment information.
353357type VersionsGet =
354− "v1beta4" :> "apps" :> Capture "appsId" Text :>
355− "modules"
356− :> Capture "modulesId" Text
357− :> "versions"
358− :> Capture "versionsId" Text
359− :> QueryParam "$.xgafv" Text
360− :> QueryParam "quotaUser" Text
361− :> QueryParam "prettyPrint" Bool
362− :> QueryParam "upload_protocol" Text
363− :> QueryParam "pp" Bool
364− :> QueryParam "access_token" Text
365− :> QueryParam "uploadType" Text
366− :> QueryParam "bearer_token" Text
367− :> QueryParam "key" Text
368− :> QueryParam "view" Text
369− :> QueryParam "oauth_token" Text
370− :> QueryParam "fields" Text
371− :> QueryParam "callback" Text
372− :> QueryParam "alt" Text
358+ "v1beta4" :>
359+ "apps" :>
360+ Capture "appsId" Text :>
361+ "modules" :>
362+ Capture "modulesId" Text :>
363+ "versions" :>
364+ Capture "versionsId" Text :>
365+ QueryParam "$.xgafv" Text :>
366+ QueryParam "quotaUser" Text :>
367+ QueryParam "prettyPrint" Bool :>
368+ QueryParam "upload_protocol" Text :>
369+ QueryParam "pp" Bool :>
370+ QueryParam "access_token" Text :>
371+ QueryParam "uploadType" Text :>
372+ QueryParam "bearer_token" Text :>
373+ QueryParam "key" Text :>
374+ QueryParam "view" Text :>
375+ QueryParam "oauth_token" Text :>
376+ QueryParam "fields" Text :>
377+ QueryParam "callback" Text :>
378+ QueryParam "alt" Text :>
379+ Get '[JSON] Version
373380
374381-- | Deploys new code and resource files to a version.
375382type VersionsCreate =
376− "v1beta4" :> "apps" :> Capture "appsId" Text :>
377− "modules"
378− :> Capture "modulesId" Text
379− :> "versions"
380− :> QueryParam "$.xgafv" Text
381− :> QueryParam "quotaUser" Text
382− :> QueryParam "prettyPrint" Bool
383− :> QueryParam "upload_protocol" Text
384− :> QueryParam "pp" Bool
385− :> QueryParam "access_token" Text
386− :> QueryParam "uploadType" Text
387− :> QueryParam "bearer_token" Text
388− :> QueryParam "key" Text
389− :> QueryParam "oauth_token" Text
390− :> QueryParam "fields" Text
391− :> QueryParam "callback" Text
392− :> QueryParam "alt" Text
383+ "v1beta4" :>
384+ "apps" :>
385+ Capture "appsId" Text :>
386+ "modules" :>
387+ Capture "modulesId" Text :>
388+ "versions" :>
389+ QueryParam "$.xgafv" Text :>
390+ QueryParam "quotaUser" Text :>
391+ QueryParam "prettyPrint" Bool :>
392+ QueryParam "upload_protocol" Text :>
393+ QueryParam "pp" Bool :>
394+ QueryParam "access_token" Text :>
395+ QueryParam "uploadType" Text :>
396+ QueryParam "bearer_token" Text :>
397+ QueryParam "key" Text :>
398+ QueryParam "oauth_token" Text :>
399+ QueryParam "fields" Text :>
400+ QueryParam "callback" Text :>
401+ QueryParam "alt" Text :>
402+ Post '[JSON] Operation
393403
394404-- | Deletes an existing version.
395405type VersionsDelete =
396− "v1beta4" :> "apps" :> Capture "appsId" Text :>
397− "modules"
398− :> Capture "modulesId" Text
399− :> "versions"
400− :> Capture "versionsId" Text
401− :> QueryParam "$.xgafv" Text
402− :> QueryParam "quotaUser" Text
403− :> QueryParam "prettyPrint" Bool
404− :> QueryParam "upload_protocol" Text
405− :> QueryParam "pp" Bool
406− :> QueryParam "access_token" Text
407− :> QueryParam "uploadType" Text
408− :> QueryParam "bearer_token" Text
409− :> QueryParam "key" Text
410− :> QueryParam "oauth_token" Text
411− :> QueryParam "fields" Text
412− :> QueryParam "callback" Text
413− :> QueryParam "alt" Text
406+ "v1beta4" :>
407+ "apps" :>
408+ Capture "appsId" Text :>
409+ "modules" :>
410+ Capture "modulesId" Text :>
411+ "versions" :>
412+ Capture "versionsId" Text :>
413+ QueryParam "$.xgafv" Text :>
414+ QueryParam "quotaUser" Text :>
415+ QueryParam "prettyPrint" Bool :>
416+ QueryParam "upload_protocol" Text :>
417+ QueryParam "pp" Bool :>
418+ QueryParam "access_token" Text :>
419+ QueryParam "uploadType" Text :>
420+ QueryParam "bearer_token" Text :>
421+ QueryParam "key" Text :>
422+ QueryParam "oauth_token" Text :>
423+ QueryParam "fields" Text :>
424+ QueryParam "callback" Text :>
425+ QueryParam "alt" Text :>
426+ Delete '[JSON] Operation
414427
415428type OperationsAPI =
416429 OperationsList :<|> OperationsGet
@@ -421,42 +434,48 @@ type OperationsAPI =
421434-- to use different resource name schemes, such as
422435-- \`users\/*\/operations\`.
423436type OperationsList =
424− "v1beta4" :> "apps" :> Capture "appsId" Text :>
425− "operations"
426− :> QueryParam "$.xgafv" Text
427− :> QueryParam "quotaUser" Text
428− :> QueryParam "prettyPrint" Bool
429− :> QueryParam "upload_protocol" Text
430− :> QueryParam "pp" Bool
431− :> QueryParam "access_token" Text
432− :> QueryParam "uploadType" Text
433− :> QueryParam "bearer_token" Text
434− :> QueryParam "key" Text
435− :> QueryParam "filter" Text
436− :> QueryParam "pageToken" Text
437− :> QueryParam "oauth_token" Text
438− :> QueryParam "pageSize" Int32
439− :> QueryParam "fields" Text
440− :> QueryParam "callback" Text
441− :> QueryParam "alt" Text
437+ "v1beta4" :>
438+ "apps" :>
439+ Capture "appsId" Text :>
440+ "operations" :>
441+ QueryParam "$.xgafv" Text :>
442+ QueryParam "quotaUser" Text :>
443+ QueryParam "prettyPrint" Bool :>
444+ QueryParam "upload_protocol" Text :>
445+ QueryParam "pp" Bool :>
446+ QueryParam "access_token" Text :>
447+ QueryParam "uploadType" Text :>
448+ QueryParam "bearer_token" Text :>
449+ QueryParam "key" Text :>
450+ QueryParam "filter" Text :>
451+ QueryParam "pageToken" Text :>
452+ QueryParam "oauth_token" Text :>
453+ QueryParam "pageSize" Int32 :>
454+ QueryParam "fields" Text :>
455+ QueryParam "callback" Text :>
456+ QueryParam "alt" Text :>
457+ Get '[JSON] ListOperationsResponse
442458
443459-- | Gets the latest state of a long-running operation. Clients can use this
444460-- method to poll the operation result at intervals as recommended by the
445461-- API service.
446462type OperationsGet =
447− "v1beta4" :> "apps" :> Capture "appsId" Text :>
448− "operations"
449− :> Capture "operationsId" Text
450− :> QueryParam "$.xgafv" Text
451− :> QueryParam "quotaUser" Text
452− :> QueryParam "prettyPrint" Bool
453− :> QueryParam "upload_protocol" Text
454− :> QueryParam "pp" Bool
455− :> QueryParam "access_token" Text
456− :> QueryParam "uploadType" Text
457− :> QueryParam "bearer_token" Text
458− :> QueryParam "key" Text
459− :> QueryParam "oauth_token" Text
460− :> QueryParam "fields" Text
461− :> QueryParam "callback" Text
462− :> QueryParam "alt" Text
463+ "v1beta4" :>
464+ "apps" :>
465+ Capture "appsId" Text :>
466+ "operations" :>
467+ Capture "operationsId" Text :>
468+ QueryParam "$.xgafv" Text :>
469+ QueryParam "quotaUser" Text :>
470+ QueryParam "prettyPrint" Bool :>
471+ QueryParam "upload_protocol" Text :>
472+ QueryParam "pp" Bool :>
473+ QueryParam "access_token" Text :>
474+ QueryParam "uploadType" Text :>
475+ QueryParam "bearer_token" Text :>
476+ QueryParam "key" Text :>
477+ QueryParam "oauth_token" Text :>
478+ QueryParam "fields" Text :>
479+ QueryParam "callback" Text :>
480+ QueryParam "alt" Text :>
481+ Get '[JSON] Operation
gogol-appengine/gen/Network/Google/AppEngine/Types/Product.hs+610
@@ -1,6 +1,7 @@
11{-# LANGUAGE DeriveDataTypeable #-}
22{-# LANGUAGE DeriveGeneric #-}
33{-# LANGUAGE OverloadedStrings #-}
4+{-# LANGUAGE RecordWildCards #-}
45
56{-# OPTIONS_GHC -fno-warn-unused-imports #-}
67
@@ -79,6 +80,26 @@ achAuthFailAction
7980achLogin :: Lens' ApiConfigHandler (Maybe Text)
8081achLogin = lens _achLogin (\ s a -> s{_achLogin = a})
8182
83+instance FromJSON ApiConfigHandler where
84+ parseJSON
85+ = withObject "ApiConfigHandler"
86+ (\ o ->
87+ ApiConfigHandler <$>
88+ (o .:? "script") <*> (o .:? "securityLevel") <*>
89+ (o .:? "url")
90+ <*> (o .:? "authFailAction")
91+ <*> (o .:? "login"))
92+
93+instance ToJSON ApiConfigHandler where
94+ toJSON ApiConfigHandler{..}
95+ = object
96+ (catMaybes
97+ [("script" .=) <$> _achScript,
98+ ("securityLevel" .=) <$> _achSecurityLevel,
99+ ("url" .=) <$> _achUrl,
100+ ("authFailAction" .=) <$> _achAuthFailAction,
101+ ("login" .=) <$> _achLogin])
102+
82103-- | Use Google Cloud Endpoints to handle requests.
83104--
84105-- /See:/ 'apiEndpointHandler' smart constructor.
@@ -104,6 +125,16 @@ aehScriptPath
104125 = lens _aehScriptPath
105126 (\ s a -> s{_aehScriptPath = a})
106127
128+instance FromJSON ApiEndpointHandler where
129+ parseJSON
130+ = withObject "ApiEndpointHandler"
131+ (\ o -> ApiEndpointHandler <$> (o .:? "scriptPath"))
132+
133+instance ToJSON ApiEndpointHandler where
134+ toJSON ApiEndpointHandler{..}
135+ = object
136+ (catMaybes [("scriptPath" .=) <$> _aehScriptPath])
137+
107138-- | An Application contains the top-level configuration of an App Engine
108139-- application.
109140--
@@ -176,6 +207,26 @@ aDispatchRules
176207aId :: Lens' Application (Maybe Text)
177208aId = lens _aId (\ s a -> s{_aId = a})
178209
210+instance FromJSON Application where
211+ parseJSON
212+ = withObject "Application"
213+ (\ o ->
214+ Application <$>
215+ (o .:? "location") <*> (o .:? "codeBucket") <*>
216+ (o .:? "name")
217+ <*> (o .:? "dispatchRules" .!= mempty)
218+ <*> (o .:? "id"))
219+
220+instance ToJSON Application where
221+ toJSON Application{..}
222+ = object
223+ (catMaybes
224+ [("location" .=) <$> _aLocation,
225+ ("codeBucket" .=) <$> _aCodeBucket,
226+ ("name" .=) <$> _aName,
227+ ("dispatchRules" .=) <$> _aDispatchRules,
228+ ("id" .=) <$> _aId])
229+
179230-- | Automatic scaling is the scaling policy that App Engine has used since
180231-- its inception. It is based on request rate, response latencies, and
181232-- other application metrics.
@@ -293,6 +344,36 @@ asMaxPendingLatency
293344 = lens _asMaxPendingLatency
294345 (\ s a -> s{_asMaxPendingLatency = a})
295346
347+instance FromJSON AutomaticScaling where
348+ parseJSON
349+ = withObject "AutomaticScaling"
350+ (\ o ->
351+ AutomaticScaling <$>
352+ (o .:? "maxTotalInstances") <*>
353+ (o .:? "minIdleInstances")
354+ <*> (o .:? "minPendingLatency")
355+ <*> (o .:? "cpuUtilization")
356+ <*> (o .:? "maxIdleInstances")
357+ <*> (o .:? "minTotalInstances")
358+ <*> (o .:? "maxConcurrentRequests")
359+ <*> (o .:? "coolDownPeriod")
360+ <*> (o .:? "maxPendingLatency"))
361+
362+instance ToJSON AutomaticScaling where
363+ toJSON AutomaticScaling{..}
364+ = object
365+ (catMaybes
366+ [("maxTotalInstances" .=) <$> _asMaxTotalInstances,
367+ ("minIdleInstances" .=) <$> _asMinIdleInstances,
368+ ("minPendingLatency" .=) <$> _asMinPendingLatency,
369+ ("cpuUtilization" .=) <$> _asCpuUtilization,
370+ ("maxIdleInstances" .=) <$> _asMaxIdleInstances,
371+ ("minTotalInstances" .=) <$> _asMinTotalInstances,
372+ ("maxConcurrentRequests" .=) <$>
373+ _asMaxConcurrentRequests,
374+ ("coolDownPeriod" .=) <$> _asCoolDownPeriod,
375+ ("maxPendingLatency" .=) <$> _asMaxPendingLatency])
376+
296377-- | A module with basic scaling will create an instance when the application
297378-- receives a request. The instance will be turned down when the app
298379-- becomes idle. Basic scaling is ideal for work that is intermittent or
@@ -333,6 +414,20 @@ bsIdleTimeout
333414 = lens _bsIdleTimeout
334415 (\ s a -> s{_bsIdleTimeout = a})
335416
417+instance FromJSON BasicScaling where
418+ parseJSON
419+ = withObject "BasicScaling"
420+ (\ o ->
421+ BasicScaling <$>
422+ (o .:? "maxInstances") <*> (o .:? "idleTimeout"))
423+
424+instance ToJSON BasicScaling where
425+ toJSON BasicScaling{..}
426+ = object
427+ (catMaybes
428+ [("maxInstances" .=) <$> _bsMaxInstances,
429+ ("idleTimeout" .=) <$> _bsIdleTimeout])
430+
336431-- | A Docker (container) image which should be used to start the
337432-- application.
338433--
@@ -359,6 +454,15 @@ containerInfo =
359454ciImage :: Lens' ContainerInfo (Maybe Text)
360455ciImage = lens _ciImage (\ s a -> s{_ciImage = a})
361456
457+instance FromJSON ContainerInfo where
458+ parseJSON
459+ = withObject "ContainerInfo"
460+ (\ o -> ContainerInfo <$> (o .:? "image"))
461+
462+instance ToJSON ContainerInfo where
463+ toJSON ContainerInfo{..}
464+ = object (catMaybes [("image" .=) <$> _ciImage])
465+
362466-- | Target scaling by CPU usage.
363467--
364468-- /See:/ 'cpuUtilization' smart constructor.
@@ -394,6 +498,22 @@ cuTargetUtilization
394498 = lens _cuTargetUtilization
395499 (\ s a -> s{_cuTargetUtilization = a})
396500
501+instance FromJSON CpuUtilization where
502+ parseJSON
503+ = withObject "CpuUtilization"
504+ (\ o ->
505+ CpuUtilization <$>
506+ (o .:? "aggregationWindowLength") <*>
507+ (o .:? "targetUtilization"))
508+
509+instance ToJSON CpuUtilization where
510+ toJSON CpuUtilization{..}
511+ = object
512+ (catMaybes
513+ [("aggregationWindowLength" .=) <$>
514+ _cuAggregationWindowLength,
515+ ("targetUtilization" .=) <$> _cuTargetUtilization])
516+
397517-- | Code and application artifacts used to deploy a version to App Engine.
398518--
399519-- /See:/ 'deployment' smart constructor.
@@ -443,6 +563,22 @@ dSourceReferences
443563 . _Default
444564 . _Coerce
445565
566+instance FromJSON Deployment where
567+ parseJSON
568+ = withObject "Deployment"
569+ (\ o ->
570+ Deployment <$>
571+ (o .:? "container") <*> (o .:? "files") <*>
572+ (o .:? "sourceReferences" .!= mempty))
573+
574+instance ToJSON Deployment where
575+ toJSON Deployment{..}
576+ = object
577+ (catMaybes
578+ [("container" .=) <$> _dContainer,
579+ ("files" .=) <$> _dFiles,
580+ ("sourceReferences" .=) <$> _dSourceReferences])
581+
446582-- | A manifest of files stored in Google Cloud Storage which should be
447583-- included as part of this application. All files must be readable using
448584-- the credentials supplied with this call.
@@ -458,6 +594,14 @@ deploymentFiles
458594 :: DeploymentFiles
459595deploymentFiles = DeploymentFiles
460596
597+instance FromJSON DeploymentFiles where
598+ parseJSON
599+ = withObject "DeploymentFiles"
600+ (\ o -> pure DeploymentFiles)
601+
602+instance ToJSON DeploymentFiles where
603+ toJSON = const (Object mempty)
604+
461605-- | A custom static error page to be served when an error occurs.
462606--
463607-- /See:/ 'errorHandler' smart constructor.
@@ -500,6 +644,22 @@ ehStaticFile :: Lens' ErrorHandler (Maybe Text)
500644ehStaticFile
501645 = lens _ehStaticFile (\ s a -> s{_ehStaticFile = a})
502646
647+instance FromJSON ErrorHandler where
648+ parseJSON
649+ = withObject "ErrorHandler"
650+ (\ o ->
651+ ErrorHandler <$>
652+ (o .:? "mimeType") <*> (o .:? "errorCode") <*>
653+ (o .:? "staticFile"))
654+
655+instance ToJSON ErrorHandler where
656+ toJSON ErrorHandler{..}
657+ = object
658+ (catMaybes
659+ [("mimeType" .=) <$> _ehMimeType,
660+ ("errorCode" .=) <$> _ehErrorCode,
661+ ("staticFile" .=) <$> _ehStaticFile])
662+
503663-- | A single source file which is part of the application to be deployed.
504664--
505665-- /See:/ 'fileInfo' smart constructor.
@@ -544,6 +704,22 @@ fiSourceUrl :: Lens' FileInfo (Maybe Text)
544704fiSourceUrl
545705 = lens _fiSourceUrl (\ s a -> s{_fiSourceUrl = a})
546706
707+instance FromJSON FileInfo where
708+ parseJSON
709+ = withObject "FileInfo"
710+ (\ o ->
711+ FileInfo <$>
712+ (o .:? "sha1Sum") <*> (o .:? "mimeType") <*>
713+ (o .:? "sourceUrl"))
714+
715+instance ToJSON FileInfo where
716+ toJSON FileInfo{..}
717+ = object
718+ (catMaybes
719+ [("sha1Sum" .=) <$> _fiSha1Sum,
720+ ("mimeType" .=) <$> _fiMimeType,
721+ ("sourceUrl" .=) <$> _fiSourceUrl])
722+
547723-- | Configure health checking for the VM instances. Unhealthy VM instances
548724-- will be killed and replaced with new instances.
549725--
@@ -630,6 +806,31 @@ hcUnhealthyThreshold
630806 = lens _hcUnhealthyThreshold
631807 (\ s a -> s{_hcUnhealthyThreshold = a})
632808
809+instance FromJSON HealthCheck where
810+ parseJSON
811+ = withObject "HealthCheck"
812+ (\ o ->
813+ HealthCheck <$>
814+ (o .:? "healthyThreshold") <*>
815+ (o .:? "disableHealthCheck")
816+ <*> (o .:? "checkInterval")
817+ <*> (o .:? "restartThreshold")
818+ <*> (o .:? "host")
819+ <*> (o .:? "timeout")
820+ <*> (o .:? "unhealthyThreshold"))
821+
822+instance ToJSON HealthCheck where
823+ toJSON HealthCheck{..}
824+ = object
825+ (catMaybes
826+ [("healthyThreshold" .=) <$> _hcHealthyThreshold,
827+ ("disableHealthCheck" .=) <$> _hcDisableHealthCheck,
828+ ("checkInterval" .=) <$> _hcCheckInterval,
829+ ("restartThreshold" .=) <$> _hcRestartThreshold,
830+ ("host" .=) <$> _hcHost,
831+ ("timeout" .=) <$> _hcTimeout,
832+ ("unhealthyThreshold" .=) <$> _hcUnhealthyThreshold])
833+
633834-- | A Python runtime third-party library required by the application.
634835--
635836-- /See:/ 'library' smart constructor.
@@ -661,6 +862,19 @@ lName = lens _lName (\ s a -> s{_lName = a})
661862lVersion :: Lens' Library (Maybe Text)
662863lVersion = lens _lVersion (\ s a -> s{_lVersion = a})
663864
865+instance FromJSON Library where
866+ parseJSON
867+ = withObject "Library"
868+ (\ o ->
869+ Library <$> (o .:? "name") <*> (o .:? "version"))
870+
871+instance ToJSON Library where
872+ toJSON Library{..}
873+ = object
874+ (catMaybes
875+ [("name" .=) <$> _lName,
876+ ("version" .=) <$> _lVersion])
877+
664878-- | Response message for \`Modules.ListModules\`.
665879--
666880-- /See:/ 'listModulesResponse' smart constructor.
@@ -697,6 +911,21 @@ lmrModules
697911 _Default
698912 . _Coerce
699913
914+instance FromJSON ListModulesResponse where
915+ parseJSON
916+ = withObject "ListModulesResponse"
917+ (\ o ->
918+ ListModulesResponse <$>
919+ (o .:? "nextPageToken") <*>
920+ (o .:? "modules" .!= mempty))
921+
922+instance ToJSON ListModulesResponse where
923+ toJSON ListModulesResponse{..}
924+ = object
925+ (catMaybes
926+ [("nextPageToken" .=) <$> _lmrNextPageToken,
927+ ("modules" .=) <$> _lmrModules])
928+
700929-- | The response message for
701930-- [Operations.ListOperations][google.longrunning.Operations.ListOperations].
702931--
@@ -735,6 +964,21 @@ lorOperations
735964 . _Default
736965 . _Coerce
737966
967+instance FromJSON ListOperationsResponse where
968+ parseJSON
969+ = withObject "ListOperationsResponse"
970+ (\ o ->
971+ ListOperationsResponse <$>
972+ (o .:? "nextPageToken") <*>
973+ (o .:? "operations" .!= mempty))
974+
975+instance ToJSON ListOperationsResponse where
976+ toJSON ListOperationsResponse{..}
977+ = object
978+ (catMaybes
979+ [("nextPageToken" .=) <$> _lorNextPageToken,
980+ ("operations" .=) <$> _lorOperations])
981+
738982-- | Response message for \`Versions.ListVersions\`.
739983--
740984-- /See:/ 'listVersionsResponse' smart constructor.
@@ -771,6 +1015,21 @@ lvrVersions
7711015 _Default
7721016 . _Coerce
7731017
1018+instance FromJSON ListVersionsResponse where
1019+ parseJSON
1020+ = withObject "ListVersionsResponse"
1021+ (\ o ->
1022+ ListVersionsResponse <$>
1023+ (o .:? "nextPageToken") <*>
1024+ (o .:? "versions" .!= mempty))
1025+
1026+instance ToJSON ListVersionsResponse where
1027+ toJSON ListVersionsResponse{..}
1028+ = object
1029+ (catMaybes
1030+ [("nextPageToken" .=) <$> _lvrNextPageToken,
1031+ ("versions" .=) <$> _lvrVersions])
1032+
7741033-- | A module with manual scaling runs continuously, allowing you to perform
7751034-- complex initialization and rely on the state of its memory over time.
7761035--
@@ -799,6 +1058,16 @@ msInstances :: Lens' ManualScaling (Maybe Int32)
7991058msInstances
8001059 = lens _msInstances (\ s a -> s{_msInstances = a})
8011060
1061+instance FromJSON ManualScaling where
1062+ parseJSON
1063+ = withObject "ManualScaling"
1064+ (\ o -> ManualScaling <$> (o .:? "instances"))
1065+
1066+instance ToJSON ManualScaling where
1067+ toJSON ManualScaling{..}
1068+ = object
1069+ (catMaybes [("instances" .=) <$> _msInstances])
1070+
8021071-- | A module is a component of an application that provides a single service
8031072-- or configuration. A module has a collection of versions that define a
8041073-- specific set of code used to implement the functionality of that module.
@@ -843,6 +1112,20 @@ mName = lens _mName (\ s a -> s{_mName = a})
8431112mId :: Lens' Module (Maybe Text)
8441113mId = lens _mId (\ s a -> s{_mId = a})
8451114
1115+instance FromJSON Module where
1116+ parseJSON
1117+ = withObject "Module"
1118+ (\ o ->
1119+ Module <$>
1120+ (o .:? "split") <*> (o .:? "name") <*> (o .:? "id"))
1121+
1122+instance ToJSON Module where
1123+ toJSON Module{..}
1124+ = object
1125+ (catMaybes
1126+ [("split" .=) <$> _mSplit, ("name" .=) <$> _mName,
1127+ ("id" .=) <$> _mId])
1128+
8461129-- | Used to specify extra network settings (for VM runtimes only).
8471130--
8481131-- /See:/ 'network' smart constructor.
@@ -890,6 +1173,23 @@ nInstanceTag
8901173nName :: Lens' Network (Maybe Text)
8911174nName = lens _nName (\ s a -> s{_nName = a})
8921175
1176+instance FromJSON Network where
1177+ parseJSON
1178+ = withObject "Network"
1179+ (\ o ->
1180+ Network <$>
1181+ (o .:? "forwardedPorts" .!= mempty) <*>
1182+ (o .:? "instanceTag")
1183+ <*> (o .:? "name"))
1184+
1185+instance ToJSON Network where
1186+ toJSON Network{..}
1187+ = object
1188+ (catMaybes
1189+ [("forwardedPorts" .=) <$> _nForwardedPorts,
1190+ ("instanceTag" .=) <$> _nInstanceTag,
1191+ ("name" .=) <$> _nName])
1192+
8931193-- | This resource represents a long-running operation that is the result of
8941194-- a network API call.
8951195--
@@ -963,6 +1263,25 @@ oMetadata :: Lens' Operation (Maybe OperationMetadata)
9631263oMetadata
9641264 = lens _oMetadata (\ s a -> s{_oMetadata = a})
9651265
1266+instance FromJSON Operation where
1267+ parseJSON
1268+ = withObject "Operation"
1269+ (\ o ->
1270+ Operation <$>
1271+ (o .:? "done") <*> (o .:? "error") <*>
1272+ (o .:? "response")
1273+ <*> (o .:? "name")
1274+ <*> (o .:? "metadata"))
1275+
1276+instance ToJSON Operation where
1277+ toJSON Operation{..}
1278+ = object
1279+ (catMaybes
1280+ [("done" .=) <$> _oDone, ("error" .=) <$> _oError,
1281+ ("response" .=) <$> _oResponse,
1282+ ("name" .=) <$> _oName,
1283+ ("metadata" .=) <$> _oMetadata])
1284+
9661285-- | Service-specific metadata associated with the operation. It typically
9671286-- contains progress information and common metadata such as create time.
9681287-- Some services might not provide such metadata. Any method that returns a
@@ -979,6 +1298,14 @@ operationMetadata
9791298 :: OperationMetadata
9801299operationMetadata = OperationMetadata
9811300
1301+instance FromJSON OperationMetadata where
1302+ parseJSON
1303+ = withObject "OperationMetadata"
1304+ (\ o -> pure OperationMetadata)
1305+
1306+instance ToJSON OperationMetadata where
1307+ toJSON = const (Object mempty)
1308+
9821309-- | The normal response of the operation in case of success. If the original
9831310-- method returns no data on success, such as \`Delete\`, the response is
9841311-- \`google.protobuf.Empty\`. If the original method is standard
@@ -999,6 +1326,14 @@ operationResponse
9991326 :: OperationResponse
10001327operationResponse = OperationResponse
10011328
1329+instance FromJSON OperationResponse where
1330+ parseJSON
1331+ = withObject "OperationResponse"
1332+ (\ o -> pure OperationResponse)
1333+
1334+instance ToJSON OperationResponse where
1335+ toJSON = const (Object mempty)
1336+
10021337-- | Used to specify how many machine resources an app version needs.
10031338--
10041339-- /See:/ 'resources' smart constructor.
@@ -1039,6 +1374,21 @@ rDiskGb = lens _rDiskGb (\ s a -> s{_rDiskGb = a})
10391374rCpu :: Lens' Resources (Maybe Double)
10401375rCpu = lens _rCpu (\ s a -> s{_rCpu = a})
10411376
1377+instance FromJSON Resources where
1378+ parseJSON
1379+ = withObject "Resources"
1380+ (\ o ->
1381+ Resources <$>
1382+ (o .:? "memoryGb") <*> (o .:? "diskGb") <*>
1383+ (o .:? "cpu"))
1384+
1385+instance ToJSON Resources where
1386+ toJSON Resources{..}
1387+ = object
1388+ (catMaybes
1389+ [("memoryGb" .=) <$> _rMemoryGb,
1390+ ("diskGb" .=) <$> _rDiskGb, ("cpu" .=) <$> _rCpu])
1391+
10421392-- | Executes a script to handle the request that matches the URL pattern.
10431393--
10441394-- /See:/ 'scriptHandler' smart constructor.
@@ -1063,6 +1413,16 @@ shScriptPath :: Lens' ScriptHandler (Maybe Text)
10631413shScriptPath
10641414 = lens _shScriptPath (\ s a -> s{_shScriptPath = a})
10651415
1416+instance FromJSON ScriptHandler where
1417+ parseJSON
1418+ = withObject "ScriptHandler"
1419+ (\ o -> ScriptHandler <$> (o .:? "scriptPath"))
1420+
1421+instance ToJSON ScriptHandler where
1422+ toJSON ScriptHandler{..}
1423+ = object
1424+ (catMaybes [("scriptPath" .=) <$> _shScriptPath])
1425+
10661426-- | A reference to a particular snapshot of the source tree used to build
10671427-- and deploy the application.
10681428--
@@ -1100,6 +1460,20 @@ srRevisionId :: Lens' SourceReference (Maybe Text)
11001460srRevisionId
11011461 = lens _srRevisionId (\ s a -> s{_srRevisionId = a})
11021462
1463+instance FromJSON SourceReference where
1464+ parseJSON
1465+ = withObject "SourceReference"
1466+ (\ o ->
1467+ SourceReference <$>
1468+ (o .:? "repository") <*> (o .:? "revisionId"))
1469+
1470+instance ToJSON SourceReference where
1471+ toJSON SourceReference{..}
1472+ = object
1473+ (catMaybes
1474+ [("repository" .=) <$> _srRepository,
1475+ ("revisionId" .=) <$> _srRevisionId])
1476+
11031477-- | Files served directly to the user for a given URL, such as images, CSS
11041478-- stylesheets, or JavaScript source files. Static directory handlers make
11051479-- it easy to serve the entire contents of a directory as static files.
@@ -1188,6 +1562,31 @@ sdhDirectory :: Lens' StaticDirectoryHandler (Maybe Text)
11881562sdhDirectory
11891563 = lens _sdhDirectory (\ s a -> s{_sdhDirectory = a})
11901564
1565+instance FromJSON StaticDirectoryHandler where
1566+ parseJSON
1567+ = withObject "StaticDirectoryHandler"
1568+ (\ o ->
1569+ StaticDirectoryHandler <$>
1570+ (o .:? "httpHeaders") <*>
1571+ (o .:? "requireMatchingFile")
1572+ <*> (o .:? "expiration")
1573+ <*> (o .:? "mimeType")
1574+ <*> (o .:? "applicationReadable")
1575+ <*> (o .:? "directory"))
1576+
1577+instance ToJSON StaticDirectoryHandler where
1578+ toJSON StaticDirectoryHandler{..}
1579+ = object
1580+ (catMaybes
1581+ [("httpHeaders" .=) <$> _sdhHttpHeaders,
1582+ ("requireMatchingFile" .=) <$>
1583+ _sdhRequireMatchingFile,
1584+ ("expiration" .=) <$> _sdhExpiration,
1585+ ("mimeType" .=) <$> _sdhMimeType,
1586+ ("applicationReadable" .=) <$>
1587+ _sdhApplicationReadable,
1588+ ("directory" .=) <$> _sdhDirectory])
1589+
11911590-- | HTTP headers to use for all responses from these URLs.
11921591--
11931592-- /See:/ 'staticDirectoryHandlerHttpHeaders' smart constructor.
@@ -1201,6 +1600,16 @@ staticDirectoryHandlerHttpHeaders
12011600 :: StaticDirectoryHandlerHttpHeaders
12021601staticDirectoryHandlerHttpHeaders = StaticDirectoryHandlerHttpHeaders
12031602
1603+instance FromJSON StaticDirectoryHandlerHttpHeaders
1604+ where
1605+ parseJSON
1606+ = withObject "StaticDirectoryHandlerHttpHeaders"
1607+ (\ o -> pure StaticDirectoryHandlerHttpHeaders)
1608+
1609+instance ToJSON StaticDirectoryHandlerHttpHeaders
1610+ where
1611+ toJSON = const (Object mempty)
1612+
12041613-- | Files served directly to the user for a given URL, such as images, CSS
12051614-- stylesheets, or JavaScript source files. Static file handlers describe
12061615-- which files in the application directory are static files, and which
@@ -1300,6 +1709,32 @@ sfhUploadPathRegex
13001709 = lens _sfhUploadPathRegex
13011710 (\ s a -> s{_sfhUploadPathRegex = a})
13021711
1712+instance FromJSON StaticFilesHandler where
1713+ parseJSON
1714+ = withObject "StaticFilesHandler"
1715+ (\ o ->
1716+ StaticFilesHandler <$>
1717+ (o .:? "httpHeaders") <*> (o .:? "path") <*>
1718+ (o .:? "requireMatchingFile")
1719+ <*> (o .:? "expiration")
1720+ <*> (o .:? "mimeType")
1721+ <*> (o .:? "applicationReadable")
1722+ <*> (o .:? "uploadPathRegex"))
1723+
1724+instance ToJSON StaticFilesHandler where
1725+ toJSON StaticFilesHandler{..}
1726+ = object
1727+ (catMaybes
1728+ [("httpHeaders" .=) <$> _sfhHttpHeaders,
1729+ ("path" .=) <$> _sfhPath,
1730+ ("requireMatchingFile" .=) <$>
1731+ _sfhRequireMatchingFile,
1732+ ("expiration" .=) <$> _sfhExpiration,
1733+ ("mimeType" .=) <$> _sfhMimeType,
1734+ ("applicationReadable" .=) <$>
1735+ _sfhApplicationReadable,
1736+ ("uploadPathRegex" .=) <$> _sfhUploadPathRegex])
1737+
13031738-- | HTTP headers to use for all responses from these URLs.
13041739--
13051740-- /See:/ 'staticFilesHandlerHttpHeaders' smart constructor.
@@ -1313,6 +1748,14 @@ staticFilesHandlerHttpHeaders
13131748 :: StaticFilesHandlerHttpHeaders
13141749staticFilesHandlerHttpHeaders = StaticFilesHandlerHttpHeaders
13151750
1751+instance FromJSON StaticFilesHandlerHttpHeaders where
1752+ parseJSON
1753+ = withObject "StaticFilesHandlerHttpHeaders"
1754+ (\ o -> pure StaticFilesHandlerHttpHeaders)
1755+
1756+instance ToJSON StaticFilesHandlerHttpHeaders where
1757+ toJSON = const (Object mempty)
1758+
13161759-- | The \`Status\` type defines a logical error model that is suitable for
13171760-- different programming environments, including REST APIs and RPC APIs. It
13181761-- is used by [gRPC](https:\/\/github.com\/grpc). The error model is
@@ -1395,6 +1838,22 @@ sCode = lens _sCode (\ s a -> s{_sCode = a})
13951838sMessage :: Lens' Status (Maybe Text)
13961839sMessage = lens _sMessage (\ s a -> s{_sMessage = a})
13971840
1841+instance FromJSON Status where
1842+ parseJSON
1843+ = withObject "Status"
1844+ (\ o ->
1845+ Status <$>
1846+ (o .:? "details" .!= mempty) <*> (o .:? "code") <*>
1847+ (o .:? "message"))
1848+
1849+instance ToJSON Status where
1850+ toJSON Status{..}
1851+ = object
1852+ (catMaybes
1853+ [("details" .=) <$> _sDetails,
1854+ ("code" .=) <$> _sCode,
1855+ ("message" .=) <$> _sMessage])
1856+
13981857--
13991858-- /See:/ 'statusItemDetails' smart constructor.
14001859data StatusItemDetails =
@@ -1407,6 +1866,14 @@ statusItemDetails
14071866 :: StatusItemDetails
14081867statusItemDetails = StatusItemDetails
14091868
1869+instance FromJSON StatusItemDetails where
1870+ parseJSON
1871+ = withObject "StatusItemDetails"
1872+ (\ o -> pure StatusItemDetails)
1873+
1874+instance ToJSON StatusItemDetails where
1875+ toJSON = const (Object mempty)
1876+
14101877-- | Configuration for traffic splitting for versions within a single module.
14111878-- Traffic splitting allows traffic directed to the module to be assigned
14121879-- to one of several versions in a fractional way, enabling experiments and
@@ -1453,6 +1920,20 @@ tsAllocations
14531920 = lens _tsAllocations
14541921 (\ s a -> s{_tsAllocations = a})
14551922
1923+instance FromJSON TrafficSplit where
1924+ parseJSON
1925+ = withObject "TrafficSplit"
1926+ (\ o ->
1927+ TrafficSplit <$>
1928+ (o .:? "shardBy") <*> (o .:? "allocations"))
1929+
1930+instance ToJSON TrafficSplit where
1931+ toJSON TrafficSplit{..}
1932+ = object
1933+ (catMaybes
1934+ [("shardBy" .=) <$> _tsShardBy,
1935+ ("allocations" .=) <$> _tsAllocations])
1936+
14561937-- | Mapping from module version IDs within the module to fractional (0.000,
14571938-- 1] allocations of traffic for that version. Each version may only be
14581939-- specified once, but some versions in the module may not have any traffic
@@ -1473,6 +1954,14 @@ trafficSplitAllocations
14731954 :: TrafficSplitAllocations
14741955trafficSplitAllocations = TrafficSplitAllocations
14751956
1957+instance FromJSON TrafficSplitAllocations where
1958+ parseJSON
1959+ = withObject "TrafficSplitAllocations"
1960+ (\ o -> pure TrafficSplitAllocations)
1961+
1962+instance ToJSON TrafficSplitAllocations where
1963+ toJSON = const (Object mempty)
1964+
14761965-- | Rules to match an HTTP request and dispatch that request to a module.
14771966--
14781967-- /See:/ 'urlDispatchRule' smart constructor.
@@ -1519,6 +2008,22 @@ udrModule :: Lens' UrlDispatchRule (Maybe Text)
15192008udrModule
15202009 = lens _udrModule (\ s a -> s{_udrModule = a})
15212010
2011+instance FromJSON UrlDispatchRule where
2012+ parseJSON
2013+ = withObject "UrlDispatchRule"
2014+ (\ o ->
2015+ UrlDispatchRule <$>
2016+ (o .:? "path") <*> (o .:? "domain") <*>
2017+ (o .:? "module"))
2018+
2019+instance ToJSON UrlDispatchRule where
2020+ toJSON UrlDispatchRule{..}
2021+ = object
2022+ (catMaybes
2023+ [("path" .=) <$> _udrPath,
2024+ ("domain" .=) <$> _udrDomain,
2025+ ("module" .=) <$> _udrModule])
2026+
15222027-- | A URL pattern and description of how it should be handled. App Engine
15232028-- can handle URLs by executing application code, or by serving static
15242029-- files uploaded with the code, such as images, CSS or JavaScript.
@@ -1629,6 +2134,35 @@ umStaticDirectory
16292134 = lens _umStaticDirectory
16302135 (\ s a -> s{_umStaticDirectory = a})
16312136
2137+instance FromJSON UrlMap where
2138+ parseJSON
2139+ = withObject "UrlMap"
2140+ (\ o ->
2141+ UrlMap <$>
2142+ (o .:? "script") <*> (o .:? "securityLevel") <*>
2143+ (o .:? "apiEndpoint")
2144+ <*> (o .:? "urlRegex")
2145+ <*> (o .:? "redirectHttpResponseCode")
2146+ <*> (o .:? "authFailAction")
2147+ <*> (o .:? "staticFiles")
2148+ <*> (o .:? "login")
2149+ <*> (o .:? "staticDirectory"))
2150+
2151+instance ToJSON UrlMap where
2152+ toJSON UrlMap{..}
2153+ = object
2154+ (catMaybes
2155+ [("script" .=) <$> _umScript,
2156+ ("securityLevel" .=) <$> _umSecurityLevel,
2157+ ("apiEndpoint" .=) <$> _umApiEndpoint,
2158+ ("urlRegex" .=) <$> _umUrlRegex,
2159+ ("redirectHttpResponseCode" .=) <$>
2160+ _umRedirectHttpResponseCode,
2161+ ("authFailAction" .=) <$> _umAuthFailAction,
2162+ ("staticFiles" .=) <$> _umStaticFiles,
2163+ ("login" .=) <$> _umLogin,
2164+ ("staticDirectory" .=) <$> _umStaticDirectory])
2165+
16322166-- | A Version is a specific set of source code and configuration files
16332167-- deployed to a module.
16342168--
@@ -1934,6 +2468,66 @@ vDeployment :: Lens' Version (Maybe (Maybe Deployment))
19342468vDeployment
19352469 = lens _vDeployment (\ s a -> s{_vDeployment = a})
19362470
2471+instance FromJSON Version where
2472+ parseJSON
2473+ = withObject "Version"
2474+ (\ o ->
2475+ Version <$>
2476+ (o .:? "creationTime") <*> (o .:? "runtime") <*>
2477+ (o .:? "deployer")
2478+ <*> (o .:? "nobuildFilesRegex")
2479+ <*> (o .:? "instanceClass")
2480+ <*> (o .:? "healthCheck")
2481+ <*> (o .:? "env")
2482+ <*> (o .:? "defaultExpiration")
2483+ <*> (o .:? "automaticScaling")
2484+ <*> (o .:? "errorHandlers" .!= mempty)
2485+ <*> (o .:? "vm")
2486+ <*> (o .:? "handlers" .!= mempty)
2487+ <*> (o .:? "inboundServices" .!= mempty)
2488+ <*> (o .:? "network")
2489+ <*> (o .:? "resources")
2490+ <*> (o .:? "name")
2491+ <*> (o .:? "threadsafe")
2492+ <*> (o .:? "betaSettings")
2493+ <*> (o .:? "basicScaling")
2494+ <*> (o .:? "manualScaling")
2495+ <*> (o .:? "apiConfig")
2496+ <*> (o .:? "id")
2497+ <*> (o .:? "envVariables")
2498+ <*> (o .:? "servingStatus")
2499+ <*> (o .:? "libraries" .!= mempty)
2500+ <*> (o .:? "deployment"))
2501+
2502+instance ToJSON Version where
2503+ toJSON Version{..}
2504+ = object
2505+ (catMaybes
2506+ [("creationTime" .=) <$> _vCreationTime,
2507+ ("runtime" .=) <$> _vRuntime,
2508+ ("deployer" .=) <$> _vDeployer,
2509+ ("nobuildFilesRegex" .=) <$> _vNobuildFilesRegex,
2510+ ("instanceClass" .=) <$> _vInstanceClass,
2511+ ("healthCheck" .=) <$> _vHealthCheck,
2512+ ("env" .=) <$> _vEnv,
2513+ ("defaultExpiration" .=) <$> _vDefaultExpiration,
2514+ ("automaticScaling" .=) <$> _vAutomaticScaling,
2515+ ("errorHandlers" .=) <$> _vErrorHandlers,
2516+ ("vm" .=) <$> _vVm, ("handlers" .=) <$> _vHandlers,
2517+ ("inboundServices" .=) <$> _vInboundServices,
2518+ ("network" .=) <$> _vNetwork,
2519+ ("resources" .=) <$> _vResources,
2520+ ("name" .=) <$> _vName,
2521+ ("threadsafe" .=) <$> _vThreadsafe,
2522+ ("betaSettings" .=) <$> _vBetaSettings,
2523+ ("basicScaling" .=) <$> _vBasicScaling,
2524+ ("manualScaling" .=) <$> _vManualScaling,
2525+ ("apiConfig" .=) <$> _vApiConfig, ("id" .=) <$> _vId,
2526+ ("envVariables" .=) <$> _vEnvVariables,
2527+ ("servingStatus" .=) <$> _vServingStatus,
2528+ ("libraries" .=) <$> _vLibraries,
2529+ ("deployment" .=) <$> _vDeployment])
2530+
19372531-- | Beta settings supplied to the application via metadata.
19382532--
19392533-- /See:/ 'versionBetaSettings' smart constructor.
@@ -1947,6 +2541,14 @@ versionBetaSettings
19472541 :: VersionBetaSettings
19482542versionBetaSettings = VersionBetaSettings
19492543
2544+instance FromJSON VersionBetaSettings where
2545+ parseJSON
2546+ = withObject "VersionBetaSettings"
2547+ (\ o -> pure VersionBetaSettings)
2548+
2549+instance ToJSON VersionBetaSettings where
2550+ toJSON = const (Object mempty)
2551+
19502552-- | Environment variables made available to the application. Only returned
19512553-- in \`GET\` requests if \`view=FULL\` is set. May only be set on create
19522554-- requests; once created, is immutable.
@@ -1961,3 +2563,11 @@ data VersionEnvVariables =
19612563versionEnvVariables
19622564 :: VersionEnvVariables
19632565versionEnvVariables = VersionEnvVariables
2566+
2567+instance FromJSON VersionEnvVariables where
2568+ parseJSON
2569+ = withObject "VersionEnvVariables"
2570+ (\ o -> pure VersionEnvVariables)
2571+
2572+instance ToJSON VersionEnvVariables where
2573+ toJSON = const (Object mempty)
gogol-apps-activity/gen/Network/Google/Apps/Activity.hs+18−15
@@ -133,18 +133,21 @@ type ActivitiesAPI = ActivitiesList
133133-- similar. A request is scoped to activities from a given Google service
134134-- using the source parameter.
135135type ActivitiesList =
136− "appsactivity" :> "v1" :> "activities" :>
137− QueryParam "quotaUser" Text
138− :> QueryParam "prettyPrint" Bool
139− :> QueryParam "userIp" Text
140− :> QueryParam "drive.fileId" Text
141− :> QueryParam "drive.ancestorId" Text
142− :> QueryParam "groupingStrategy" Text
143− :> QueryParam "userId" Text
144− :> QueryParam "key" Text
145− :> QueryParam "source" Text
146− :> QueryParam "pageToken" Text
147− :> QueryParam "oauth_token" Text
148− :> QueryParam "pageSize" Int32
149− :> QueryParam "fields" Text
150− :> QueryParam "alt" Text
136+ "appsactivity" :>
137+ "v1" :>
138+ "activities" :>
139+ QueryParam "quotaUser" Text :>
140+ QueryParam "prettyPrint" Bool :>
141+ QueryParam "userIp" Text :>
142+ QueryParam "drive.fileId" Text :>
143+ QueryParam "drive.ancestorId" Text :>
144+ QueryParam "groupingStrategy" Text :>
145+ QueryParam "userId" Text :>
146+ QueryParam "key" Text :>
147+ QueryParam "source" Text :>
148+ QueryParam "pageToken" Text :>
149+ QueryParam "oauth_token" Text :>
150+ QueryParam "pageSize" Int32 :>
151+ QueryParam "fields" Text :>
152+ QueryParam "alt" Text :>
153+ Get '[JSON] ListActivitiesResponse
gogol-apps-activity/gen/Network/Google/Apps/Activity/Types/Product.hs+171
@@ -1,6 +1,7 @@
11{-# LANGUAGE DeriveDataTypeable #-}
22{-# LANGUAGE DeriveGeneric #-}
33{-# LANGUAGE OverloadedStrings #-}
4+{-# LANGUAGE RecordWildCards #-}
45
56{-# OPTIONS_GHC -fno-warn-unused-imports #-}
67
@@ -56,6 +57,21 @@ aCombinedEvent
5657 = lens _aCombinedEvent
5758 (\ s a -> s{_aCombinedEvent = a})
5859
60+instance FromJSON Activity where
61+ parseJSON
62+ = withObject "Activity"
63+ (\ o ->
64+ Activity <$>
65+ (o .:? "singleEvents" .!= mempty) <*>
66+ (o .:? "combinedEvent"))
67+
68+instance ToJSON Activity where
69+ toJSON Activity{..}
70+ = object
71+ (catMaybes
72+ [("singleEvents" .=) <$> _aSingleEvents,
73+ ("combinedEvent" .=) <$> _aCombinedEvent])
74+
5975-- | Represents the changes associated with an action taken by a user.
6076--
6177-- /See:/ 'event' smart constructor.
@@ -163,6 +179,34 @@ eTarget = lens _eTarget (\ s a -> s{_eTarget = a})
163179eMove :: Lens' Event (Maybe (Maybe Move))
164180eMove = lens _eMove (\ s a -> s{_eMove = a})
165181
182+instance FromJSON Event where
183+ parseJSON
184+ = withObject "Event"
185+ (\ o ->
186+ Event <$>
187+ (o .:? "primaryEventType") <*> (o .:? "user") <*>
188+ (o .:? "eventTimeMillis")
189+ <*> (o .:? "rename")
190+ <*> (o .:? "fromUserDeletion")
191+ <*> (o .:? "additionalEventTypes" .!= mempty)
192+ <*> (o .:? "permissionChanges" .!= mempty)
193+ <*> (o .:? "target")
194+ <*> (o .:? "move"))
195+
196+instance ToJSON Event where
197+ toJSON Event{..}
198+ = object
199+ (catMaybes
200+ [("primaryEventType" .=) <$> _ePrimaryEventType,
201+ ("user" .=) <$> _eUser,
202+ ("eventTimeMillis" .=) <$> _eEventTimeMillis,
203+ ("rename" .=) <$> _eRename,
204+ ("fromUserDeletion" .=) <$> _eFromUserDeletion,
205+ ("additionalEventTypes" .=) <$>
206+ _eAdditionalEventTypes,
207+ ("permissionChanges" .=) <$> _ePermissionChanges,
208+ ("target" .=) <$> _eTarget, ("move" .=) <$> _eMove])
209+
166210-- | The response from the list request. Contains a list of activities and a
167211-- token to retrieve the next page of results.
168212--
@@ -201,6 +245,21 @@ larActivities
201245 . _Default
202246 . _Coerce
203247
248+instance FromJSON ListActivitiesResponse where
249+ parseJSON
250+ = withObject "ListActivitiesResponse"
251+ (\ o ->
252+ ListActivitiesResponse <$>
253+ (o .:? "nextPageToken") <*>
254+ (o .:? "activities" .!= mempty))
255+
256+instance ToJSON ListActivitiesResponse where
257+ toJSON ListActivitiesResponse{..}
258+ = object
259+ (catMaybes
260+ [("nextPageToken" .=) <$> _larNextPageToken,
261+ ("activities" .=) <$> _larActivities])
262+
204263-- | Contains information about changes in an object\'s parents as a result
205264-- of a move type event.
206265--
@@ -241,6 +300,21 @@ mRemovedParents
241300 . _Default
242301 . _Coerce
243302
303+instance FromJSON Move where
304+ parseJSON
305+ = withObject "Move"
306+ (\ o ->
307+ Move <$>
308+ (o .:? "addedParents" .!= mempty) <*>
309+ (o .:? "removedParents" .!= mempty))
310+
311+instance ToJSON Move where
312+ toJSON Move{..}
313+ = object
314+ (catMaybes
315+ [("addedParents" .=) <$> _mAddedParents,
316+ ("removedParents" .=) <$> _mRemovedParents])
317+
244318-- | Contains information about a parent object. For example, a folder in
245319-- Drive is a parent for all files within it.
246320--
@@ -281,6 +355,21 @@ pId = lens _pId (\ s a -> s{_pId = a})
281355pTitle :: Lens' Parent (Maybe Text)
282356pTitle = lens _pTitle (\ s a -> s{_pTitle = a})
283357
358+instance FromJSON Parent where
359+ parseJSON
360+ = withObject "Parent"
361+ (\ o ->
362+ Parent <$>
363+ (o .:? "isRoot") <*> (o .:? "id") <*>
364+ (o .:? "title"))
365+
366+instance ToJSON Parent where
367+ toJSON Parent{..}
368+ = object
369+ (catMaybes
370+ [("isRoot" .=) <$> _pIsRoot, ("id" .=) <$> _pId,
371+ ("title" .=) <$> _pTitle])
372+
284373-- | Contains information about the permissions and type of access allowed
285374-- with regards to a Google Drive object. This is a subset of the fields
286375-- contained in a corresponding Drive Permissions object.
@@ -351,6 +440,26 @@ pPermissionId
351440 = lens _pPermissionId
352441 (\ s a -> s{_pPermissionId = a})
353442
443+instance FromJSON Permission where
444+ parseJSON
445+ = withObject "Permission"
446+ (\ o ->
447+ Permission <$>
448+ (o .:? "withLink") <*> (o .:? "user") <*>
449+ (o .:? "role")
450+ <*> (o .:? "name")
451+ <*> (o .:? "type")
452+ <*> (o .:? "permissionId"))
453+
454+instance ToJSON Permission where
455+ toJSON Permission{..}
456+ = object
457+ (catMaybes
458+ [("withLink" .=) <$> _pWithLink,
459+ ("user" .=) <$> _pUser, ("role" .=) <$> _pRole,
460+ ("name" .=) <$> _pName, ("type" .=) <$> _pType,
461+ ("permissionId" .=) <$> _pPermissionId])
462+
354463-- | Contains information about a Drive object\'s permissions that changed as
355464-- a result of a permissionChange type event.
356465--
@@ -391,6 +500,21 @@ pcRemovedPermissions
391500 . _Default
392501 . _Coerce
393502
503+instance FromJSON PermissionChange where
504+ parseJSON
505+ = withObject "PermissionChange"
506+ (\ o ->
507+ PermissionChange <$>
508+ (o .:? "addedPermissions" .!= mempty) <*>
509+ (o .:? "removedPermissions" .!= mempty))
510+
511+instance ToJSON PermissionChange where
512+ toJSON PermissionChange{..}
513+ = object
514+ (catMaybes
515+ [("addedPermissions" .=) <$> _pcAddedPermissions,
516+ ("removedPermissions" .=) <$> _pcRemovedPermissions])
517+
394518-- | Photo information for a user.
395519--
396520-- /See:/ 'photo' smart constructor.
@@ -414,6 +538,14 @@ photo =
414538pUrl :: Lens' Photo (Maybe Text)
415539pUrl = lens _pUrl (\ s a -> s{_pUrl = a})
416540
541+instance FromJSON Photo where
542+ parseJSON
543+ = withObject "Photo" (\ o -> Photo <$> (o .:? "url"))
544+
545+instance ToJSON Photo where
546+ toJSON Photo{..}
547+ = object (catMaybes [("url" .=) <$> _pUrl])
548+
417549-- | Contains information about a renametype event.
418550--
419551-- /See:/ 'rename' smart constructor.
@@ -447,6 +579,19 @@ rOldTitle :: Lens' Rename (Maybe Text)
447579rOldTitle
448580 = lens _rOldTitle (\ s a -> s{_rOldTitle = a})
449581
582+instance FromJSON Rename where
583+ parseJSON
584+ = withObject "Rename"
585+ (\ o ->
586+ Rename <$> (o .:? "newTitle") <*> (o .:? "oldTitle"))
587+
588+instance ToJSON Rename where
589+ toJSON Rename{..}
590+ = object
591+ (catMaybes
592+ [("newTitle" .=) <$> _rNewTitle,
593+ ("oldTitle" .=) <$> _rOldTitle])
594+
450595-- | Information about the object modified by the event.
451596--
452597-- /See:/ 'target' smart constructor.
@@ -489,6 +634,21 @@ tName = lens _tName (\ s a -> s{_tName = a})
489634tId :: Lens' Target (Maybe Text)
490635tId = lens _tId (\ s a -> s{_tId = a})
491636
637+instance FromJSON Target where
638+ parseJSON
639+ = withObject "Target"
640+ (\ o ->
641+ Target <$>
642+ (o .:? "mimeType") <*> (o .:? "name") <*>
643+ (o .:? "id"))
644+
645+instance ToJSON Target where
646+ toJSON Target{..}
647+ = object
648+ (catMaybes
649+ [("mimeType" .=) <$> _tMimeType,
650+ ("name" .=) <$> _tName, ("id" .=) <$> _tId])
651+
492652-- | A representation of a user.
493653--
494654-- /See:/ 'user' smart constructor.
@@ -519,3 +679,14 @@ uPhoto = lens _uPhoto (\ s a -> s{_uPhoto = a})
519679-- | The displayable name of the user.
520680uName :: Lens' User (Maybe Text)
521681uName = lens _uName (\ s a -> s{_uName = a})
682+
683+instance FromJSON User where
684+ parseJSON
685+ = withObject "User"
686+ (\ o -> User <$> (o .:? "photo") <*> (o .:? "name"))
687+
688+instance ToJSON User where
689+ toJSON User{..}
690+ = object
691+ (catMaybes
692+ [("photo" .=) <$> _uPhoto, ("name" .=) <$> _uName])
gogol-apps-activity/gen/Network/Google/Apps/Activity/Types/Sum.hs+24
@@ -73,6 +73,12 @@ instance ToText EventItemAdditionalEventTypes where
7373 EIAETUntrash -> "untrash"
7474 EIAETUpload -> "upload"
7575
76+instance FromJSON EventItemAdditionalEventTypes where
77+ parseJSON = parseJSONText "EventItemAdditionalEventTypes"
78+
79+instance ToJSON EventItemAdditionalEventTypes where
80+ toJSON = toJSONText
81+
7682-- | The main type of event that occurred.
7783data EventPrimaryEventType
7884 = EPETComment
@@ -130,6 +136,12 @@ instance ToText EventPrimaryEventType where
130136 EPETUntrash -> "untrash"
131137 EPETUpload -> "upload"
132138
139+instance FromJSON EventPrimaryEventType where
140+ parseJSON = parseJSONText "EventPrimaryEventType"
141+
142+instance ToJSON EventPrimaryEventType where
143+ toJSON = toJSONText
144+
133145-- | Indicates the Google Drive permissions role. The role determines a
134146-- user\'s ability to read, write, or comment on the file.
135147data PermissionRole
@@ -160,6 +172,12 @@ instance ToText PermissionRole where
160172 PRReader -> "reader"
161173 PRWriter -> "writer"
162174
175+instance FromJSON PermissionRole where
176+ parseJSON = parseJSONText "PermissionRole"
177+
178+instance ToJSON PermissionRole where
179+ toJSON = toJSONText
180+
163181-- | Indicates how widely permissions are granted.
164182data PermissionType
165183 = PTAnyone
@@ -188,3 +206,9 @@ instance ToText PermissionType where
188206 PTDomain -> "domain"
189207 PTGroup -> "group"
190208 PTUser -> "user"
209+
210+instance FromJSON PermissionType where
211+ parseJSON = parseJSONText "PermissionType"
212+
213+instance ToJSON PermissionType where
214+ toJSON = toJSONText
gogol-apps-calendar/gen/Network/Google/Apps/Calendar.hs+593−460

This diff is too big to show here.

gogol-apps-calendar/gen/Network/Google/Apps/Calendar/Types/Product.hs+738

This diff is too big to show here.

gogol-apps-licensing/gen/Network/Google/Apps/Licensing.hs+119−92

This diff is too big to show here.

gogol-apps-licensing/gen/Network/Google/Apps/Licensing/Types/Product.hs+50

This diff is too big to show here.

gogol-apps-reseller/gen/Network/Google/Apps/Reseller.hs+205−156

This diff is too big to show here.

gogol-apps-reseller/gen/Network/Google/Apps/Reseller/Types/Product.hs+232

This diff is too big to show here.

gogol-apps-tasks/gen/Network/Google/Apps/Tasks.hs+195−146

This diff is too big to show here.

gogol-apps-tasks/gen/Network/Google/Apps/Tasks/Types/Product.hs+108

This diff is too big to show here.

gogol-bigquery/gen/Network/Google/BigQuery.hs+309−260

This diff is too big to show here.

gogol-bigquery/gen/Network/Google/BigQuery/Types/Product.hs+967

This diff is too big to show here.

gogol-billing/gen/Network/Google/Billing.hs+54−44

This diff is too big to show here.

gogol-billing/gen/Network/Google/Billing/Types/Product.hs+66

This diff is too big to show here.

gogol-blogger/gen/Network/Google/Blogger.hs+523−417

This diff is too big to show here.

gogol-blogger/gen/Network/Google/Blogger/Types/Product.hs+593

This diff is too big to show here.

gogol-books/gen/Network/Google/Books.hs+547−432

This diff is too big to show here.

gogol-books/gen/Network/Google/Books/Types/Product.hs+1705

This diff is too big to show here.

gogol-civicinfo/gen/Network/Google/CivicInfo.hs+67−52

This diff is too big to show here.

gogol-civicinfo/gen/Network/Google/CivicInfo/Types/Product.hs+478

This diff is too big to show here.

gogol-classroom/gen/Network/Google/Classroom.hs+312−263

This diff is too big to show here.

gogol-classroom/gen/Network/Google/Classroom/Types/Product.hs+219

This diff is too big to show here.

gogol-compute-autoscaler/gen/Network/Google/Compute/Autoscaler.hs+153−129

This diff is too big to show here.

gogol-compute-autoscaler/gen/Network/Google/Compute/Autoscaler/Types/Product.hs+338

This diff is too big to show here.

gogol-compute-instancegroups-manager/gen/Network/Google/Compute/InstanceGroups/Manager.hs+201−167

This diff is too big to show here.

gogol-compute-instancegroups-manager/gen/Network/Google/Compute/InstanceGroups/Manager/Types/Product.hs+287

This diff is too big to show here.

gogol-compute-instancegroups-manager/gen/Network/Google/Compute/InstanceGroups/Manager/Types/Sum.hs+18

This diff is too big to show here.

gogol-compute-instancegroups-updater/gen/Network/Google/Compute/InstanceGroups/Updater.hs+169−141

This diff is too big to show here.

gogol-compute-instancegroups-updater/gen/Network/Google/Compute/InstanceGroups/Updater/Types/Product.hs+305

This diff is too big to show here.

gogol-compute-instancegroups/gen/Network/Google/Compute/InstanceGroups.hs+188−156

This diff is too big to show here.

gogol-compute-instancegroups/gen/Network/Google/Compute/InstanceGroups/Types/Product.hs+302

This diff is too big to show here.

gogol-compute-useraccounts/gen/Network/Google/Compute/UserAccounts.hs+266−224

This diff is too big to show here.

gogol-compute-useraccounts/gen/Network/Google/Compute/UserAccounts/Types/Product.hs+360

This diff is too big to show here.

gogol-compute-useraccounts/gen/Network/Google/Compute/UserAccounts/Types/Sum.hs+12

This diff is too big to show here.

gogol-compute/gen/Network/Google/Compute.hs+2723−2274

This diff is too big to show here.

gogol-compute/gen/Network/Google/Compute/Types/Product.hs+3683

This diff is too big to show here.

gogol-compute/gen/Network/Google/Compute/Types/Sum.hs+282

This diff is too big to show here.

gogol-container/gen/Network/Google/Container.hs+116−95

This diff is too big to show here.

gogol-container/gen/Network/Google/Container/Types/Product.hs+189

This diff is too big to show here.

gogol-container/gen/Network/Google/Container/Types/Sum.hs+18

This diff is too big to show here.

gogol-customsearch/gen/Network/Google/CustomSearch.hs+90−40

This diff is too big to show here.

gogol-customsearch/gen/Network/Google/CustomSearch/Types/Product.hs+339

This diff is too big to show here.

gogol-dataflow/gen/Network/Google/Dataflow.hs+67−56

This diff is too big to show here.

gogol-dataflow/gen/Network/Google/Dataflow/Types/Product.hs+1490

This diff is too big to show here.

gogol-datastore/gen/Network/Google/Datastore.hs+76−60

This diff is too big to show here.

gogol-datastore/gen/Network/Google/Datastore/Types/Product.hs+544

This diff is too big to show here.

gogol-datastore/gen/Network/Google/Datastore/Types/Sum.hs+54

This diff is too big to show here.

gogol-debugger/gen/Network/Google/Debugger.hs+127−106

This diff is too big to show here.

gogol-debugger/gen/Network/Google/Debugger/Types/Product.hs+389

This diff is too big to show here.

gogol-deploymentmanager/gen/Network/Google/DeploymentManager.hs+212−179

This diff is too big to show here.

gogol-deploymentmanager/gen/Network/Google/DeploymentManager/Types/Product.hs+349

This diff is too big to show here.

gogol-dfareporting/gen/Network/Google/DFAReporting.hs+2948−2320

This diff is too big to show here.

gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Product.hs+4718

This diff is too big to show here.

gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Sum.hs+588

This diff is too big to show here.

gogol-discovery/gen/Network/Google/Discovery.hs+26−20

This diff is too big to show here.

gogol-discovery/gen/Network/Google/Discovery/Types/Product.hs+470

This diff is too big to show here.

gogol-dns/gen/Network/Google/DNS.hs+133−111

This diff is too big to show here.

gogol-dns/gen/Network/Google/DNS/Types/Product.hs+168

This diff is too big to show here.

gogol-doubleclick-bids/gen/Network/Google/DoubleClick/Bids.hs+91−71

This diff is too big to show here.

gogol-doubleclick-bids/gen/Network/Google/DoubleClick/Bids/Types/Product.hs+337

This diff is too big to show here.

gogol-doubleclick-bids/gen/Network/Google/DoubleClick/Bids/Types/Sum.hs+84

This diff is too big to show here.

gogol-doubleclick-search/gen/Network/Google/DoubleClick/Search.hs+135−111

This diff is too big to show here.

gogol-doubleclick-search/gen/Network/Google/DoubleClick/Search/Types/Product.hs+397

This diff is too big to show here.

gogol-drive/gen/Network/Google/Drive.hs+849−661

This diff is too big to show here.

gogol-drive/gen/Network/Google/Drive/Types/Product.hs+1065

This diff is too big to show here.

gogol-fitness/gen/Network/Google/Fitness.hs+110−85

This diff is too big to show here.

gogol-fitness/gen/Network/Google/Fitness/Types/Product.hs+348

This diff is too big to show here.

gogol-fitness/gen/Network/Google/Fitness/Types/Sum.hs+24

This diff is too big to show here.

gogol-fonts/gen/Network/Google/Fonts.hs+11−9

This diff is too big to show here.

gogol-fonts/gen/Network/Google/Fonts/Types/Product.hs+51

This diff is too big to show here.

gogol-freebasesearch/gen/Network/Google/Freebase/Search.hs+74−45

This diff is too big to show here.

gogol-freebasesearch/gen/Network/Google/Freebase/Search/Types/Product.hs+81

This diff is too big to show here.

gogol-fusiontables/gen/Network/Google/FusionTables.hs+432−363

This diff is too big to show here.

gogol-fusiontables/gen/Network/Google/FusionTables/Types/Product.hs+463

This diff is too big to show here.

gogol-games-appstate/gen/Network/Google/Games/AppState.hs+58−48

This diff is too big to show here.

gogol-games-appstate/gen/Network/Google/Games/AppState/Types/Product.hs+68

This diff is too big to show here.

gogol-games-configuration/gen/Network/Google/Games/Configuration.hs+166−127

This diff is too big to show here.

gogol-games-configuration/gen/Network/Google/Games/Configuration/Types/Product.hs+234

This diff is too big to show here.

gogol-games-management/gen/Network/Google/Games/Management.hs+322−259

This diff is too big to show here.

gogol-games-management/gen/Network/Google/Games/Management/Types/Product.hs+274

This diff is too big to show here.

gogol-games/gen/Network/Google/Games.hs+717−569

This diff is too big to show here.

gogol-games/gen/Network/Google/Games/Types/Product.hs+2055

This diff is too big to show here.

gogol-genomics/gen/Network/Google/Genomics.hs+567−447

This diff is too big to show here.

gogol-genomics/gen/Network/Google/Genomics/Types/Product.hs+1469

This diff is too big to show here.

gogol-genomics/gen/Network/Google/Genomics/Types/Sum.hs+84

This diff is too big to show here.

gogol-gmail/gen/Network/Google/Gmail.hs+278−213

This diff is too big to show here.

gogol-gmail/gen/Network/Google/Gmail/Types/Product.hs+358

This diff is too big to show here.

gogol-gmail/gen/Network/Google/Gmail/Types/Sum.hs+24

This diff is too big to show here.

gogol-groups-migration/gen/Network/Google/Groups/Migration.hs+12−10

This diff is too big to show here.

gogol-groups-migration/gen/Network/Google/Groups/Migration/Types/Product.hs+16

This diff is too big to show here.

gogol-groups-migration/gen/Network/Google/Groups/Settings.hs+33−27

This diff is too big to show here.

gogol-groups-migration/gen/Network/Google/Groups/Settings/Types/Product.hs+77

This diff is too big to show here.

gogol-identity-toolkit/gen/Network/Google/IdentityToolkit.hs+145−108

This diff is too big to show here.

gogol-identity-toolkit/gen/Network/Google/IdentityToolkit/Types/Product.hs+632

This diff is too big to show here.

gogol-latencytest/gen/Network/Google/LatencyTest.hs+21−16

This diff is too big to show here.

gogol-latencytest/gen/Network/Google/LatencyTest/Types/Product.hs+88

This diff is too big to show here.

gogol-logging/gen/Network/Google/Logging.hs+346−293

This diff is too big to show here.

gogol-logging/gen/Network/Google/Logging/Types/Product.hs+423

This diff is too big to show here.

gogol-maps-coordinate/gen/Network/Google/Maps/Coordinate.hs+210−176

This diff is too big to show here.

gogol-maps-coordinate/gen/Network/Google/Maps/Coordinate/Types/Product.hs+323

This diff is too big to show here.

gogol-maps-engine/gen/Network/Google/Map/Engine.hs+492−375

This diff is too big to show here.

gogol-maps-engine/gen/Network/Google/Map/Engine/Types/Product.hs+1296

This diff is too big to show here.

gogol-maps-engine/gen/Network/Google/Map/Engine/Types/Sum.hs+204

This diff is too big to show here.

gogol-mirror/gen/Network/Google/Mirror.hs+205−159

This diff is too big to show here.

gogol-mirror/gen/Network/Google/Mirror/Types/Product.hs+401

This diff is too big to show here.

gogol-monitoring/gen/Network/Google/Monitoring.hs+102−82

This diff is too big to show here.

gogol-monitoring/gen/Network/Google/Monitoring/Types/Product.hs+356

This diff is too big to show here.

gogol-oauth2/gen/Network/Google/OAuth2.hs+10−8

This diff is too big to show here.

gogol-oauth2/gen/Network/Google/OAuth2/Types/Product.hs+85

This diff is too big to show here.

gogol-pagespeed/gen/Network/Google/PageSpeed.hs+16−14

This diff is too big to show here.

gogol-pagespeed/gen/Network/Google/PageSpeed/Types/Product.hs+239

This diff is too big to show here.

gogol-partners/gen/Network/Google/Partners.hs+88−73

This diff is too big to show here.

gogol-partners/gen/Network/Google/Partners/Types/Product.hs+442

This diff is too big to show here.

gogol-play-developer/gen/Network/Google/Play/Developer.hs+739−622

This diff is too big to show here.

gogol-play-developer/gen/Network/Google/Play/Developer/Types/Product.hs+738

This diff is too big to show here.

gogol-play-enterprise/gen/Network/Google/Play/Enterprise.hs+707−584

This diff is too big to show here.

gogol-play-enterprise/gen/Network/Google/Play/Enterprise/Types/Product.hs+562

This diff is too big to show here.

gogol-play-moviespartner/gen/Network/Google/Play/Movies/Partner.hs+141−119

This diff is too big to show here.

gogol-play-moviespartner/gen/Network/Google/Play/Movies/Partner/Types/Product.hs+313

This diff is too big to show here.

gogol-plus-domains/gen/Network/Google/PlusDomains.hs+262−218

This diff is too big to show here.

gogol-plus-domains/gen/Network/Google/PlusDomains/Types/Product.hs+1063

This diff is too big to show here.

gogol-plus/gen/Network/Google/Plus.hs+159−127

This diff is too big to show here.

gogol-plus/gen/Network/Google/Plus/Types/Product.hs+1008

This diff is too big to show here.

gogol-prediction/gen/Network/Google/Prediction.hs+108−92

This diff is too big to show here.

gogol-prediction/gen/Network/Google/Prediction/Types/Product.hs+430

This diff is too big to show here.

gogol-proximitybeacon/gen/Network/Google/ProximityBeacon.hs+121−104

This diff is too big to show here.

gogol-proximitybeacon/gen/Network/Google/ProximityBeacon/Types/Product.hs+287

This diff is too big to show here.

gogol-pubsub/gen/Network/Google/PubSub.hs+193−171

This diff is too big to show here.

gogol-pubsub/gen/Network/Google/PubSub/Types/Product.hs+291

This diff is too big to show here.

gogol-qpxexpress/gen/Network/Google/QPXExpress.hs+12−8

This diff is too big to show here.

gogol-qpxexpress/gen/Network/Google/QPXExpress/Types/Product.hs+517

This diff is too big to show here.

gogol-resourcemanager/gen/Network/Google/ResourceManager.hs+249−220

This diff is too big to show here.

gogol-resourcemanager/gen/Network/Google/ResourceManager/Types/Product.hs+181

This diff is too big to show here.

gogol-shopping-content/gen/Network/Google/Shopping/Content.hs+207−176

This diff is too big to show here.

gogol-shopping-content/gen/Network/Google/Shopping/Content/Types/Product.hs+1107

This diff is too big to show here.

gogol-siteverification/gen/Network/Google/SiteVerification.hs+82−61

This diff is too big to show here.

gogol-siteverification/gen/Network/Google/SiteVerification/Types/Product.hs+103

This diff is too big to show here.

gogol-spectrum/gen/Network/Google/Spectrum.hs+72−51

This diff is too big to show here.

gogol-spectrum/gen/Network/Google/Spectrum/Types/Product.hs+610

This diff is too big to show here.

gogol-sqladmin/gen/Network/Google/SQLAdmin.hs+536−446

This diff is too big to show here.

gogol-sqladmin/gen/Network/Google/SQLAdmin/Types/Product.hs+845

This diff is too big to show here.

gogol-storage-transfer/gen/Network/Google/Storage/Transfer.hs+194−166

This diff is too big to show here.

gogol-storage-transfer/gen/Network/Google/Storage/Transfer/Types/Product.hs+447

This diff is too big to show here.

gogol-storage/gen/Network/Google/Storage.hs+557−445

This diff is too big to show here.

gogol-storage/gen/Network/Google/Storage/Types/Product.hs+463

This diff is too big to show here.

gogol-tagmanager/gen/Network/Google/TagManager.hs+606−511

This diff is too big to show here.

gogol-tagmanager/gen/Network/Google/TagManager/Types/Product.hs+624

This diff is too big to show here.

gogol-tagmanager/gen/Network/Google/TagManager/Types/Sum.hs+48

This diff is too big to show here.

gogol-translate/gen/Network/Google/Translate.hs+42−31

This diff is too big to show here.

gogol-translate/gen/Network/Google/Translate/Types/Product.hs+84

This diff is too big to show here.

gogol-urlshortener/gen/Network/Google/URLShortener.hs+35−28

This diff is too big to show here.

gogol-urlshortener/gen/Network/Google/URLShortener/Types/Product.hs+97

This diff is too big to show here.

gogol-webmaster-tools/gen/Network/Google/Webmaster/Tools.hs+175−142

This diff is too big to show here.

gogol-webmaster-tools/gen/Network/Google/Webmaster/Tools/Types/Product.hs+268

This diff is too big to show here.

gogol-youtube-analytics/gen/Network/Google/YouTube/Analytics.hs+140−107

This diff is too big to show here.

gogol-youtube-analytics/gen/Network/Google/YouTube/Analytics/Types/Product.hs+249

This diff is too big to show here.

gogol-youtube/gen/Network/Google/YouTube.hs+971−753

This diff is too big to show here.

gogol-youtube/gen/Network/Google/YouTube/Types/Product.hs+3184

This diff is too big to show here.

gogol-youtube/gen/Network/Google/YouTube/Types/Sum.hs+702

This diff is too big to show here.